W!o+ 的《小伶鼬工坊演義》︰ 一窺全豹之系統設計《懸疑》

本想著能『一魚兩吃』,同時可在『 RaspberryPi 』與『 Arduino 』上編程,欣然閱讀 GrovePi/Firmware/ 文本︰

GrovePi

GrovePi is an open source platform for connecting Grove Sensors to the Raspberry Pi.

Compiling

The best way to compile the firmware on the GrovePi is to use Ino. You can see more about ino. Make a new file directory, preferably on the Desktop or in the ~ directory. Change directory into the new directory. run ino init -t grovepi

Move the source code, including dependencies, into the /src directory that was automatically created.

The hex files are located in the .build/uno directory. Specifically it should generate a file called firmware.hex

Uploading

You can upload the firmware you’ve compiled using the following command: avrdude -c gpio -p m328p -U flash:w:.build/uno/firmware.hex

Updating the firmware on your GrovePi

If you don;t want to compile and upload, you can also run the firmware update script to update the firmware on your GrovePi to the latest version.

First make the firmware update script executable:

sudo chmod +x firmware_update.sh

then run it:

sudo ./firmware_update.sh

───

 

,於是依言安裝

Ino

Ino is a command line toolkit for working with Arduino hardware

It allows you to:

  • Quickly create new projects
  • Build a firmware from multiple source files and libraries
  • Upload the firmware to a device
  • Perform serial communication with a device (aka serial monitor)

Ino may replace Arduino IDE UI if you prefer to work with command line and an editor of your choice or if you want to integrate Arduino build process to 3-rd party IDE.

Ino is based on make to perform builds. However Makefiles are generated automatically and you’ll never see them if you don’t want to.

Features

  • Simple. No build scripts are necessary.
  • Out-of-source builds. Directories with source files are not cluttered with intermediate object files.
  • Support for *.ino and *.pde sketches as well as raw *.c and *.cpp.
  • Support for Arduino Software versions 1.x as well as 0.x.
  • Automatic dependency tracking. Referred libraries are automatically included in the build process. Changes in *.h files lead to recompilation of sources which include them.
  • Pretty colorful output.
  • Support for all boards that are supported by Arduino IDE.
  • Fast. Discovered tool paths and other stuff is cached across runs. If nothing has changed, nothing is build.
  • Flexible. Support for simple ini-style config files to setup machine-specific info like used Arduino model, Arduino distribution path, etc just once.

Installation

From source:

  • Download latest source tarball
  • Or clone it from GitHub: git clone git://github.com/amperka/ino.git
  • Do make install to perform installation under /usr/local
  • Or see INSTALL for instructions on changing destination directory

With Python setup tools:

  • Either pip install ino
  • Or easy_install ino

Requirements

  • Python 2.6+
  • Arduino IDE distribution
  • picocom for serial communication
 ───

 

。誰知造表操課第一遭,即遭遇到︰

 

pi@raspberrypi ~ mkdir project pi@raspberrypi ~ cd project/

pi@raspberrypi ~/project ino init -t grovepi Traceback (most recent call last):   File "/usr/local/bin/ino", line 6, in <module>     main()   File "/usr/local/lib/python2.7/dist-packages/ino/runner.py", line 76, in main     args.func(args)   File "/usr/local/lib/python2.7/dist-packages/ino/commands/init.py", line 46, in run     '.', ignore=lambda *args: ['manifest.ini'])   File "/usr/local/lib/python2.7/dist-packages/ino/commands/init.py", line 56, in copytree     names = os.listdir(src) OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/ino/templates/grovepi'  pi@raspberrypi ~/project 

 

『懸疑』,即使詳讀

Quick start

Learn how to work with ino in few minutes.

………

 

又不能解惑。眼下間正躊躇遭逢此事當如之何哉!!??……