MCPcopy Create free account
hub / github.com/cifertech/nRFBox / scannerSetup

Function scannerSetup

nRFBox/scanner.cpp:207–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205
206
207void scannerSetup() {
208
209 for (count = 0; count <= 128; count++)
210 {
211 sensorArray[count] = 0;
212 }
213
214 SPI.begin();
215 SPI.setDataMode(SPI_MODE0);
216 SPI.setClockDivider(SPI_CLOCK_DIV2);
217 SPI.setBitOrder(MSBFIRST);
218
219 pinMode(CE,OUTPUT);
220 disable();
221
222 powerUp();
223
224 setRegister(_NRF24_EN_AA,0x0);
225
226
227 setRegister(_NRF24_RF_SETUP,0x0F);
228
229}
230
231
232void scannerLoop() {

Callers 1

menuSetupFunction · 0.70

Calls 3

disableFunction · 0.70
powerUpFunction · 0.70
setRegisterFunction · 0.70

Tested by

no test coverage detected