I would like some guidance on how to convert the code from my Arduino Uno to Huzzah.
For the project I am using an accelerometer and a vibrator motor, when the X,Y,Z are at certain points it triggers the vibrator.
Currently I use all the analogue ports on the Uno and realized the father dose not have as many analog ports. is there still a way that I can do this without over complicating the project.
Im using the feather because I want to enable wifi and connect it to a Node.js server.
I'm on a tight schedule so I would appreciate any guidance, thanks.
I will attach the code I am used for the Arduino Uno below that needs to be converted to work with the feather.
postureDetectorCode.ino (1.14 KB)
This guide for the Feather says that there is only 1 analog input and it is capable of measuring 0 to 1V only. Converting Uno (6 analog inputs) to the Feather is going to take external hardware or changing to a digital accelerometer that uses I2C (for example).
Analog Pins
There is also a single analog input pin called A. This pin has a ~1.0V maximum voltage, so if you have an analogvoltage you want to read that is higher, it will have to be divided down to 0 - 1.0V range
I have never worked with the Feather, but if you can do SPI or I2C, then here are some possible solutions:
The MCP3008 will give you eight A/D ports over SPI.
The MCP3021 gives you one A/D channel over I2C.
The LTC2309 will give you eight Analog ports over I2C.
An alternative is to use the Uno to get the data from the accel and send the data to the Feather via serial, I2C or SPI. Then use the Feather to send over WiFi.