Closed yj-xxxiii closed 7 years ago
Just saw another person interested in this. Will be looking to do this soon!
+1 .. I'd like to measure at 4khz , but 2khz would be good!
Thanks for the code @yj-xxxiii looking at it now. Was having trouble with setting on the fly but your code should help me lots!
This will be addressed in 3.0.0.
Check out the new release! https://github.com/OpenBCI/OpenBCI_32bit_Library/releases/tag/v3.0.0-beta1 for full wifi support
Full code from : https://github.com/yj-xxxiii/OpenBCI_2kHz
case waiting_freq_value : if('1' <= testChar && testChar <='4') { Sample_Rate_SD_Only = 0b110-(testChar-'1'); if(EEPROM.read(2)!=Sample_Rate_SD_Only) EEPROM.write(2 , (uint8_t)Sample_Rate_SD_Only); Serial0.println(250<<(0b110-Sample_Rate_SD_Only)); } command_state = waiting_command_beginning ; break ; ... ... case 'N': writeToSDonly = true; OBCI.Sample_Rate = Sample_Rate_SD_Only ; ...
In OpenBCI_32_Daisy.cppWREG(CONFIG1,0xB0+Sample_Rate,BOARD_ADS); // tell on-board ADS to output its clk, set the data rate to Sample_Rate WREG(CONFIG1,0x90+Sample_Rate,BOARD_ADS); // turn off clk output if no daisy present
I am still unable to paste the code properly formatted... y.j.