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

Function scannerSetup

nRFBox_V2/scanner.cpp:164–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void scannerSetup() {
165 Serial.begin(115200);
166
167 esp_bt_controller_deinit();
168 esp_wifi_stop();
169 esp_wifi_deinit();
170
171 for (byte count = 0; count <= 128; count++) {
172 sensorArray[count] = 0;
173 }
174
175 SPI.begin(18, 19, 23, 17);
176 SPI.setDataMode(SPI_MODE0);
177 SPI.setFrequency(16000000);
178 SPI.setBitOrder(MSBFIRST);
179
180 pinMode(CE, OUTPUT);
181 pinMode(CSN, OUTPUT);
182
183 disable();
184
185 powerUp();
186 setRegister(_NRF24_EN_AA, 0x0);
187 setRegister(_NRF24_RF_SETUP, 0x0F);
188
189 loadPreviousGraph();
190}
191
192void scannerLoop() {
193 scanChannels();

Callers

nothing calls this directly

Calls 4

loadPreviousGraphFunction · 0.85
disableFunction · 0.70
powerUpFunction · 0.70
setRegisterFunction · 0.70

Tested by

no test coverage detected