[Documentation] [TitleIndex] [WordIndex

Bosch



Only released in EOL distros:  

bosch_drivers: adc_driver | adc_sub20 | amtec | arduino_interface | bma180 | bma180_driver | bmc050_driver | bmg160_driver | bmp085 | bmp085_driver | bosch_drivers_basic_nodes | bosch_drivers_common | bosch_drivers_example_nodes | encoder_driver | gpio_driver | gumstix_memread_bma180 | gumstix_memwrite_bma180 | photo | pwm_driver | smi540 | sub20 | sub20_interface | uniserial | usb_cam

Package Summary

The arduino_interface class contains details specifics to interfacing sensors with software using an Arduino as the physical hardware interface. Each instantiation of this class is specific to an Arduino hardware device, indentified by the serial port name. NOTE: To use this package, you must deactivate the Arduino's pullups on the SDA and SCL lines. By default, these pullups are enabled. To deactivate them, you must open the Wire library in your libraries folder and comment out two lines in the twi.c sketch. This class inherits the bosch_drivers_hardware_interface base class. In this manner, specific bosch_drivers_sensor_driver classes can access sensor data through the virtual functions provided by the parent bosch_drivers_hardware_interface class. The arduino_firmware directory contains a makefile and .ino code for building the hex files to upload to the Arduino. After a `make', type `make upload' to upload to firmware to the Arduino.

bosch_drivers: adc_driver | adc_sub20 | amtec | arduino_interface | bma180 | bma180_driver | bmc050_driver | bmg160_driver | bmp085 | bmp085_driver | bosch_drivers_basic_nodes | bosch_drivers_common | bosch_drivers_example_nodes | encoder_driver | gpio_driver | gumstix_memread_bma180 | gumstix_memwrite_bma180 | photo | pwm_driver | smi540 | sub20 | sub20_interface | uniserial | usb_cam

Package Summary

The arduino_interface class contains details specifics to interfacing sensors with software using an Arduino as the physical hardware interface. Each instantiation of this class is specific to an Arduino hardware device, indentified by the serial port name. NOTE: To use this package, you must deactivate the Arduino's pullups on the SDA and SCL lines. By default, these pullups are enabled. To deactivate them, you must open the Wire library in your libraries folder and comment out two lines in the twi.c sketch. This class inherits the bosch_drivers_hardware_interface base class. In this manner, specific bosch_drivers_sensor_driver classes can access sensor data through the virtual functions provided by the parent bosch_drivers_hardware_interface class. The arduino_firmware directory contains a makefile and .ino code for building the hex files to upload to the Arduino. After a `make', type `make upload' to upload to firmware to the Arduino.

Install Arduino Firmware

Before using this package, the firmware of the Arduino must be updated. The necessary code and a Makefile are included in the arduino_firmare directory of the package.

Install Arduino Development Environment

The Arduino development environment 1.0.1 or greater must be installed before the firmware can be built. The apt-get package name is "arduino". Note that for Ubuntu 12.04, the 1.0.1 version must be installed from the backports repository.

Building the Firmware

I2C with External Pull-up Resistors

If you are using the I2C interface on the Arduino with external pull-up resistors, you must deactivate the Arduino's internal pull-ups on the SDA and SCL lines. By default, these pullups are enabled. To deactivate them, open the Wire library in the Arduino libraries folder (nominally /usr/share/arduino/libraries). In the utilities sub-folder, open the file twi.c, and comment out lines 70 and 71:

69 // activate internal pullups for twi.
70 // digitalWrite(SDA, 1);
71 // digitalWrite(SCL, 1);

Open a terminal and change to the arduino_firmware directory. Set the Arduino board type by setting an environment variable:

$ export BOARD=uno

Alternatively, the Makefile defualt on line 281 can be changed. To see supported boards type make boards.

Build the firmware by typing

$ make

There should be a fair number of warnings, but no errors. The warnings are all in the Arduino-supplied code.

Uploading the Firmware

After the firmware is successfully built, upload it to the Arduino using

$ make upload

The Arduino is now ready for use with the arduino_interface package.

The Makefile supports additional options, as described in the table below:

Command

Description

make

Build the firmware and display the size of the code

make target

Build the firmware

make libs

Build the Arduino libraries

make clean

Remove all build files and libraries

make size

Determine the size of the copiled code

make upload

Upload the firmware (*.hex) to the Arduino

make download

Download the firmware from the Arduino to a .hex file

make erase

Erase the firmware on the Arduino

make boards

List the different Arduino boards this makefile supports

make monitor

Run the serial monitor for talking to the Arduino

Using the Package


2024-11-23 13:04