Difference between revisions of "EmonPi"
Glyn.hudson (talk | contribs) |
Glyn.hudson (talk | contribs) |
||
Line 1: | Line 1: | ||
Raspberry Pi Energy Monitoring Shield | Raspberry Pi Energy Monitoring Shield - Dev Notes | ||
=Development | =Open Development= | ||
[http://openenergymonitor.org/emon/node/3937 | [http://openenergymonitor.org/emon/node/3937 OpenEnergyMonitor.org forum thread] | ||
[https://plus.google.com/b/114424977493521882459/photos/+OpenenergymonitorOrgpage/albums/5999656723837107313 [G+ Development Photos Album] | |||
==Build Notes== | |||
==Disable Pi Serial Console== | ==Disable Pi Serial Console== | ||
Line 68: | Line 73: | ||
Script to check for working wifi connection and restart wifi if needed [https://github.com/dweeber/WiFi_Check https://github.com/dweeber/WiFi_Check] | Script to check for working wifi connection and restart wifi if needed [https://github.com/dweeber/WiFi_Check https://github.com/dweeber/WiFi_Check] | ||
For terminal GUI and auto scanning of available Wifi networks wicd can be used: | For terminal GUI and auto scanning of available Wifi networks wicd can be used: | ||
<code> | |||
sudo apt-get install wicd-curses | sudo apt-get install wicd-curses | ||
sudo wicd-curses | sudo wicd-curses | ||
http://www.raspyfi.com/wi-fi-on-raspberry-pi-a-simple-guide/ | </code> | ||
[http://www.raspyfi.com/wi-fi-on-raspberry-pi-a-simple-guide/ http://www.raspyfi.com/wi-fi-on-raspberry-pi-a-simple-guide/] | |||
==Sketch / Firmware Upload from Raspberry Pi== | |||
Assuming starting with latest version of Raspien Wheezy (tested with 2014-01-07) | |||
<code> | |||
$ sudo apt-get install arduino | |||
$ git clone https://github.com/openenergymonitor/avrdude-rpi | |||
$ cp autoreset /usr/bin | |||
$ cp avrdude-autoreset /usr/bin | |||
$ mv /usr/bin/avrdude /usr/bin/avrdude-original | |||
$ ln -s /usr/bin/avrdude-autoreset /usr/bin/avrdude | |||
</code> |
Revision as of 12:16, 2 June 2014
Raspberry Pi Energy Monitoring Shield - Dev Notes
Open Development
OpenEnergyMonitor.org forum thread
Build Notes
Disable Pi Serial Console
Simple script to easily enable & disable the Raspberry Pi's serial console. Disabling the serial console is required if you want to use the Raspberry Pi's serial port (UART) to talk to other devices e.g. ATmega328 microcontroller on emonPi (see <http://elinux.org/RPi_Serial_Connection> for more information).
https://github.com/lurch/rpi-serial-console
$sudo wget https://raw.github.com/lurch/rpi-serial-console/master/rpi-serial-console -O /usr/bin/rpi-serial-console && sudo chmod +x /usr/bin/rpi-serial-console
$ sudo rpi-serial-console disable
$ sudo reboot
$ rpi-serial-console status
You should see the message Serial console on /dev/ttyAMA0 is disabled, the serial port is now free for communication with the ATMega328 on the emonPi
Setting Up Wifi
Using Edimax EW-7811
We need to edit the file /etc/network/interfaces on the root file system partition of the Pi's SD card.
Either connect Pi via Ethernet and access via SSH or connect a keyboard mouse and screen to the Pi or edit the file on your computer. Assuming your connect to the Pi via SSH:
$ sudo nano /etc/network/interfaces
Change interfaces file to the following entering your SSID and password.
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "YOUR_SSID"
wpa-psk "WIFI_PASSWORD"
[CTRL] + [X] to save and exit nano
either reboot the Pi or just reboot the adapter
$ sudo ifdown wlan0; sudo ifup wlan0
Script to check for working wifi connection and restart wifi if needed https://github.com/dweeber/WiFi_Check
For terminal GUI and auto scanning of available Wifi networks wicd can be used:
sudo apt-get install wicd-curses
sudo wicd-curses
http://www.raspyfi.com/wi-fi-on-raspberry-pi-a-simple-guide/
Sketch / Firmware Upload from Raspberry Pi
Assuming starting with latest version of Raspien Wheezy (tested with 2014-01-07)
$ sudo apt-get install arduino
$ git clone https://github.com/openenergymonitor/avrdude-rpi
$ cp autoreset /usr/bin
$ cp avrdude-autoreset /usr/bin
$ mv /usr/bin/avrdude /usr/bin/avrdude-original
$ ln -s /usr/bin/avrdude-autoreset /usr/bin/avrdude