Camduino
Camduino is an interface to speak with Arduino over I2C.
|
Functions | |
void | init_camduino (int i2c_port) |
void | get_ball_position (struct position *ball) |
int | object_detected () |
int | get_pstate (enum psensor sensor) |
Librairy to get some data from an Arduino over I2C. CMUcam4 must be connect on it and Arduino must run "CMU_Tracker_I2C" program, distance sensors must be connected to the board too.
Trampoline is copyright (c) IRCCyN 2005-2014 Trampoline is protected by the French intellectual property law.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
void get_ball_position | ( | struct position * | ball | ) |
Fill a position strucuture to get ball position
[in] | ball | A reference to the struct to fill |
int get_pstate | ( | enum psensor | sensor | ) |
Get an given presence sensor state
[in] | sensor | Name of the presence sensor to examine |
[out] | int | state of the sensor, return 0 if no detected object, else 1 |
void init_camduino | ( | int | i2c_port | ) |
Initiate Arduino driver, don't forget to call i2c_init() after. Set up i2c port, tram communication and power supply.
[in] | i2c_port | NXT port where Arduino is connected |
int object_detected | ( | ) |
Get global presence sensors state
[out] | int | State of the presence sensors, equals to NO_DETECTED_OBJECT if an object is not detected, else return a different value |