Monday, March 23, 2015

Arduino + Yun Shield(Dragino Yun Shield)

Preparation:




  1. Arduino UNO board. Need to shortcut those two pins shown in the photo below to avoid issues with Yun Shield's bridge feature. See detail.
  2. Yun Shield.
  3. Connect both together.
  4. Yun Shield requires DC power. When Yun shield is in used, the Arduino board should be powered by DC port instead of USB port. See detail.



Setup:




  1. Follow this wiki to configure the Yun Shield. After finishing the setup, launch Arduino.app.
  2. When running Arduino.app on Mac, Board Type in its menu will show "Arduino Yun", "Arduino UNO", and others. However, the actual board type I expect is "Arduino UNO - Dragino Yun".
  3. After looking for the custom board type on the internet, I found this.
  4. Then I downloaded this boards.txt and put it in my Arduino project folder's hardware/arduino/avr/ folder. After re-launching Arduino.app, now I can see the new board types showed up.

  5. I then load the example(ConsoleRead) to see if everything works. However, I got an error message saying "/Applications/Arduino.app/Contents/Resources/Java/libraries/Bridge/src/Bridge.h:22:21: fatal
    error: Arduino.h: No such file or directory
    #include <Arduino.h>"

  6. I scratched my head for a while and trying different solutions. Finally, I figured out that I need to copy all related files from the Arduino.app's resource folder to my own Arduino project root's hardware folder.

    Source:


    Destination:
  7. Then I re-compiled and upload the ConsoleRead sketch to my Arduino via Wifi (no USB connection is needed). Everything works just fine!






    No comments:

    Post a Comment