I have ran the accelerometer on the arduino uno and had data stream through the terminal window. I would like some help on getting started on the Photon. Side note as of right now I’m just trying to get it started nothing fancy just want to learn.
I think the circuit should be setup like this?
analog 0: accelerometer self test
analog 1: z-axis
analog 2: y-axis
analog 3: x-axis
Ground : ground
3Vo : Vin
The link below shows how it’s setup on the Arduino. I think I should be able to modify this?
- List item
So what is your question exactly? You can hook it up like you show, except that I think the Adxl326 should be powered from the 3.3V pin, not Vin (Vin output is 4.8 volts). The code in that reference should work for the Photon too. The only difference I can think of is that the Arduino analog goes from 0 to 1023, whereas the Photon’s goes from 0 to 4095. You’ll have to keep that in mind when you interpret the results.
The question is how do I use Particle.publish/Particle.varible in the code so I can send it to the dashboard and see some data?? I