Dear Matthew, Looking at your code, I don't see why using ambient light functions would not work. However, if you directly use the code you have shown in pastebin, you may have problems to use libIrcom because the library needs to be properly initialized.
Stefano's approach seems to me the safe and easy way. Can you try to insert your code inside a working example from libIrcom ? Best regards, Alexandre Campo. On Wed, 30 May 2012 09:05:19 +0200 stef...@gctronic.com wrote: > Dear Matthew, > > I tried your code replacing the main in the "test" example given in > the IRcom library and the ambient light is sampled correctly (around > 3900 with little light and lower values when the light increases), see > attached project. > Did you tried others sensors? Maybe sensor0 has some problem... > Did you set your terminal to "ascii" when reading the values through BT? > > Stefano > > > Matthew Johnson <matthewp...@gmail.com> ha scritto: > > > Hello, > > > > Im trying to use the IRcom library ( > > http://www.e-puck.org/index.php?option=com_phocadownload&view=file&id=44:libircom-107&Itemid=38) > > to communicate between EPucks. I have managed to get this working however > > now the ambient light reading doesn't seem to work. I had this program: > > > > http://pastebin.com/yBGKtxYP > > > > which worked perfectly fine with the EPFL library files. However it doesn't > > seem to work with the IRcom library. I have output the reading of the IR > > sensors via BT and the reading dont seem to change no matter what the input > > light is. > > > > Could you advise me whether i need to halt something else for when i'm > > using e_get_ambient_light(int s)? or if you have any suggestions? > > > > Any help is much appreciated. > > > > Many Thanks, > > Matthew Johnson > > > > _______________________________________________ E-puck-user mailing list Eemail@example.com https://mail.gna.org/listinfo/e-puck-user