Hi Hao Ran,

Some extensions implemented in Webots such as the ground
sensors<http://www.e-puck.org/index.php?option=com_content&view=article&id=17&Itemid=18>are
accessible by reading I2C.

If you take a look at the Webots firmware
(WEBOTS/transfer/e-puck/firmware/firmware.c), the ground sensor values are
read like this:

e_i2cp_enable();
for (j=0; j<3; ++j) {
  buffer[i++] = e_i2cp_read(0xC0,2*j+1);
  buffer[i++] = e_i2cp_read(0xC0,2*j);
}
e_i2cp_disable();


This file can be extended/recompiled to implement new features/device
support.

If you're interested in extending the cross-compilation mode rather the
remote-control mode, please look at this file
WEBOTS/transfer/e-puck/libepuck/libepuck.c.


I hope this helps,

Sincerely,

--
Fabien Rohrer
Responsible in software development
Cyberbotics Sàrl <http://www.cyberbotics.com/>
PSE C - EPFL
1015 Lausanne
Switzerland
--


2013/11/5 #LIEW HAO RAN# <hrli...@e.ntu.edu.sg>

>  Hi,
>
> I would like to ask if it is possible to connect I2C devices to e-puck and
> read that device through my program? Btw, I'm using webots edu.
>
> Hao Ran
>
> Sent using OWA for iPhone
>
> _______________________________________________
> E-puck-user mailing list
> E-puck-user@gna.org
> https://mail.gna.org/listinfo/e-puck-user
>
>
_______________________________________________
E-puck-user mailing list
E-puck-user@gna.org
https://mail.gna.org/listinfo/e-puck-user

Reply via email to