Wednesday, December 16, 2015

Avrdude 6.1

I just installed the latest version of Raspbian Jessie 2015-11-21 for my Pi 2's. I found that now when I installed the arduino package, it comes with avrdude 6.1. So I don't need to link to the adafruit repository anymore. Here is a list of the steps I take to install Jessie, Arduino, Arduino-mk, and check that I can communicate between the Arduino & Raspberry Pi 2 via Serial. You'll note that I clone my git repository where I keep all of my files as I'm working on them. I find this extremely useful since I'm working on the files on my Pi2 or Gertduino/PiB at home, or the same setup that I have at work:
  1. Install Jesse 2015-11-21
  2. Go thru the configuration
    (Menu > Preferences > Raspberry Pi Configuration)
    1. Under the System Tab:
      1. Expand the filesystem
      2. Change the pi password
      3. Change the Pi Hostname
      4. Don’t automatically login to ‘pi’ user
    2. Under the Interfaces Tab:
      1. Camera = Disable
      2. SSH = Enable
      3. SPI = Enable
      4. I2C = Enable
      5. Serial = Disable
    3. I don’t change anything under the Performance Tab
    4. Under the Localisation Tab:
      1. Change the locale to Canada (English)
      2. Set the Timezone to Canada (America) > Mountain (Edmonton)
      3. I’m still having a problem with changing the keyboard layout
        1. It is a noted problem on the Raspberry Pi Forum
        2. Still using sudo raspi-config to config to Canada > English
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. sudo adduser robin
  6. sudo visudo to give robin the same rights as pi user
  7. sudo apt-get install arduino-mk
  8. sudo apt-get install arduino (add robin to dialout group)
  9. Make a link to the file:
    ln -s /usr/share/arduino/ ~/
  10. Copy the original avrdude.conf file into my home directory
    1. cp /etc/avrdude.conf ~/avrdude_gpio.conf
  11. Modify it to work with the GPIO pins
    1. nano ~/avrdude_gpio.conf
  12. Aff the following lines at the end of the file:
    1. # Linux GPIO configuration for avrdude
    2. # Change the lines below to the GPIO pins connected to the AVR
    3. programmer
    4.  id = "pi_1";
    5.  desc = "Use the Linux sysfs interface to bitbang GPIO lines";
    6.  type = "linuxgpio";
    7.  reset = 12;
    8.  sck = 24;
    9.  mosi = 23;
    10.  miso = 18;
    11. ;
  13. With the Arduino connected to the Raspberry Pi, run the following line to make sure the Raspi can see the arduino:
    sudo avrdude -p atmega328p -C ~/avrdude_gpio.conf -c pi_1 -v
  14. cp -r ~/raspi-git/Python ~ (to copy the Python directory to my home)
  15. cp -r ~/raspi-git/Uno ~ (to copy the Uno directory to my home)
  16. Goto the .hex file @ ~/Uno/Serial/Voltages/build-uno/Voltages.hex & run:
    sudo avrdude -p atmega328p -C ~/avrdude_gpio.conf -c pi_1 -v -U flash:w:Voltages.hex:i
  17. If you overwrite the bootloader, reload it by going to:
    cd /usr/share/arduino/hardware/arduino/bootloaders/optiboot/
    and running the avrdude line with the optiboot_atmega328.hex file

No comments:

Post a Comment