I've decided it was time to update the last post (it's only been about 16 months!)
- Install Jesse Raspbian with Pixel 2017-04-10
- Go thru the configuration
- Change the pi password
- Change the Pi Hostname
- Don’t automatically login to ‘pi’ user
- Under the Interfaces Tab:
- Camera = Disable
- SSH = Enable
- SPI = Enable
- I2C = Enable
- Serial = Disable
- I don't change anything under the Performance Tab
- Under the Localisation Tab:
- Change the locale to Canada (English)
- Set the Timezone to Canada (America) > Mountain (Edmonton)
- I’m still having a problem with changing the keyboard layout
- It is a noted problem on the Raspberry Pi Forum
- Still using sudo raspi-config to config to Canada > English
- sudo apt-get update
- sudo apt-get upgrade
- sudo adduser robin
- add robin to same groups as pi user (dialout for arduino)
- sudo apt-get install arduino
- sudo apt-get install arduino-mk
- Modify avrdude.conf to work with GPIO pins
- sudo nano /etc/avrdude.conf
- Ctrl-W to find the gpio reference, and uncomment the following lines
- programmer
- id = "linuxgpio";
- desc = "Use the linux sysfs interface to bitbang GPIO lines";
- type = "linuxgpio";
- reset = ?;
- sck = ?;
- mosi = ?;
- miso = ?;
- ;
- And change the ? to;
- reset = 8 (GPIO # not Actual pin #24, CE0)
- sck = 11 (Actual pin #23, SCLK)
- mosi = 10 (Actual pin #19, MOSI)
- miso = 9 (Actual pin #21, MISO)
- Wire up the Arduino ICSP header as follows:
(RESET is closest to IC)
-------------------
| MISO +5V |
| SCK MOSI |
| RESET GND |
------------------- - RESET to Raspi pin 24
- SCK to Raspi pin 23
- MISO to Raspi pin 21
- +5V to Raspi pin 2
- MOSI to Raspi pin 19
- GND to Raspi pin 6
- Type in sudo avrdude -v to ensure avrdude is responding
- Type in sudo avrdude -p atmega328p -c linuxgpio -v to ensure avrdude can communicate with the arduino
- As mentioned in my previous post, I copy my raspi-git github directory to each Raspi to make it easier to copy common files back and forth.
- cp -r ~/raspi-git/Uno/Blink ~ (to copy the blink directory to my home directory)
- move to the ~/Blink directory and run the following to download the software into the arduino
- sudo avrdude -p atmega328p -c linuxgpio -v -U flash:w:./build-uno/Blink.hex:i
- If all goes well this should upload the Blink.hex program to the arduino
- Check the Makefile for the following lines:
- BOARD_TAG = uno
- ARDUINO_PORT = /dev/ttyACM0
- ARDUINO_LIBS =
- ARDUINO_DIR = /usr/share/arduino
- include /usr/share/arduino/Arduino.mk
- Check it by modifying the ~/Blink/Blink.ino file and recompiling it
- nano ./Blink/Blink.ino
- Change the blink rate
- Ctrl-x to save
- make
- sudo avrdude -p atmega328p -c linuxgpio -v -U flash:w:./build-uno/Blink.hex:i
- the changes should be apparent on the Arduino LED
No comments:
Post a Comment