Re: [E-puck-user] Connecting I2C devices to e-puck

2013-11-06 Thread Fabien Rohrer
Hi Hao Ran,

Some extensions implemented in Webots such as the ground
sensorsare
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 
PSE C - EPFL
1015 Lausanne
Switzerland
--


2013/11/5 #LIEW HAO RAN# 

>  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


[E-puck-user] Connecting I2C devices to e-puck

2013-11-05 Thread #LIEW HAO RAN#
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