Then Mike taught us about the arduino and circuits. We made a circuit with a photocell, a resistor, bread board, and the arduino. He showed us how the information was read on his computer with the arduino software. We could see the changes in the results when the amount of light hitting the photocell changed.
Next, we plugged the arduino into the raspberry pi with a USB cord. Then we had to figure out how to get them to communicate. We found a MagPi issue (issue 7) which explained how to do this in the link: http://www.themagpi.com/issue/
We first had to install the Arduino IDE and Firmata which is the library for communicating with software on the host computer (in this case it is the raspberry pi). Then we had to install pyFirmata which allows Firmata to talk to Python and able to talk to the raspberry pi.
We also found a helpful link that had code that told the arduino to talk to the raspberry pi. Every two seconds, the arduino sent "Hello Pi" to the raspberry pi! We finally got them to communicate which has been one of our difficult goals. This is the link we used for that: http://blog.oscarliang.net/
Now that we know how to build a circuit, and get the raspberry pi and arduino to communicate, we are now trying to read the temperature from an LM34. The data sheet for this LM34 temperature sensor is: https://www.jameco.com/Jameco/
On the bright side, the new Weather Station has now arrived!!

No comments:
Post a Comment