Read data to ESP32
in Cyton
Hi,
I have a question????
How can we connect and send data from the Cyton 8-channel board to ESP-32 using Arduino IDE?
I would also like to know what datatype is being received by the ESP-32 microcontroller.
@wjcroft @retiutut @evaesteban
Comments
Sivanath, hi.
There is no interface capability in Cyton to talk to ESP32. The only communications to Cyton is via the dongle provided. The dongle and Cyton communicate through RFduino radios, one on the mainboard, and one on the dongle. The dongle appears as a usb serial port to the laptop.
Data stream documentation:
https://docs.openbci.com/Cyton/CytonDataFormat/
The normal way to communicate with Cyton is with either the OpenBCI_GUI, or the Brainflow library.
William
https://brainflow.org/
https://docs.openbci.com/Software/OpenBCISoftware/GUIDocs/
The RFduino's use a proprietary Bluetooth protocol called Gazell. They are not speaking normal Bluetooth.
There are pins for SPI communication on the Cyton board. So is it possible to communicate to the ESP-32 using SPI?
That would require complete reorganization of the firmware. It is currently setup to use either the RFduino's (default), or the ESP8266 on the Wifi Shield. Wifi Shield has been deprecated, and is no longer listed in the Shop.
https://docs.openbci.com/ThirdParty/WiFiShield/WiFiLanding/
Actually, I need to collect data from the cyton board and store them on a server. So, is there any other way to do so? i.e using the given default open bci arduino program...
Yes, as I mentioned, use the Brainflow library.
https://brainflow.readthedocs.io/en/stable/Examples.html#python
Ok fine, I will try and get back to you. Also, can you please explain a little about what you meant by "complete reorganization of the firmware" when using SPI communication?
The firmware is designed with certain functionality as described in the documentation.
https://docs.openbci.com/Cyton/CytonSDK/
There is no general purpose "SPI bus interfacing API" built into the device. Thus using an ESP32 over SPI would require major and extensive firmware modifications and definitely not something we recommend for new users of OpenBCI. The easiest approach for you will be to simply plug the dongle into a laptop or Raspberry Pi, and use the Brainflow library to collect your data.
You should be able to get that working in well under an hour.
https://brainflow.readthedocs.io/en/stable/Examples.html#python
An ESP32 project would likely take you multiple weeks to implement and debug.