Page 1 of 1

iNEMO to Arduino

Posted: Sat Oct 04, 2014 12:41 pm
by Deleterio
Salve, scusate se mi permetto di scrivere in italiano, ma lo faccio per una questione di praticità, se questo è un problema mi impegnerò a scrivere in inglese.
Io sono uno studente a cui è stata selezionata l'idea di progetto per l'iNEMO Challenge ma non ho nessuna esperienza nella programmazione di un ARM, l'intenzione infatti è quella di passare i dati processati all'interno della discovery M1 tramite seriale ad un Arduino DUE con il quale in questo momento mi trovo più a mio agio.

Ho installato ChibiOS Studio ma ho visto che nella demo per l'iNEMO non avviene alcuna lettura dei dati nei vari sensori, ne ho trovato le librerie per poterle effettuare, forse mi sbaglio io, ma ho un pò di confusione in testa.

Potreste darmi qualche dritta su come cominciare a muovermi per ottenere il mio obiettivo?
Grazie infinite in anticipo

Re: iNEMO to Arduino

Posted: Sat Oct 04, 2014 12:54 pm
by RoccoMarco
Yes, I'm sorry but this is a problem :D . Please reply using english.

Re: iNEMO to Arduino

Posted: Sat Oct 04, 2014 1:49 pm
by Deleterio
Hi, i am a student who has been selected for the project idea iNEMO Challenge but I have no experience in programming an ARM, the intention is in fact to pass data processed within the discovery M1 via serial an Arduino DUE with whom at this time I am more at ease.
I installed ChibiOS Studio but I saw in the demo there is no iNEMO reading data in the various sensors, I found a library to perform them, maybe I'm wrong, but I have a bit of confusion in my head.

Could you give me some advice how to begin to move to achieve my goal?
Thank you very much

Re: iNEMO to Arduino

Posted: Sat Oct 04, 2014 1:58 pm
by Deleterio
I'm sorry, I mean, i don't found library... :|

Re: iNEMO to Arduino

Posted: Sat Oct 04, 2014 2:19 pm
by RoccoMarco
In the first video there is just a Getting Started with ChibiOS/RT.
You should understand how to develop using ChibiStudio first. I'm wrapping the ST libraries(iNEMOEng_M1LI3) on ChibiOS.
Right now there are some libraries posted in contribution for STM32F3. Note that STM32F3 Discovery and iNEMO discovery has the same mems.
This means that changing something (like GPIO, SPI and I2C configuration) this code would work fine on both devices.
regards,
RM

Re: iNEMO to Arduino

Posted: Mon Oct 13, 2014 8:37 pm
by Deleterio
Hi RoccoMarco, i tried to use library that you suggest me, but i have a problem with a lsm303dlhc. When the program call the function lsm303dlhcAccInit() crasches, more exactly i saw from debug that the problem starts in the function lsm303dlhcReadRegister() then call i2cMasterTrasmitTimeout() and then chDbgPanic() and finish in port_halt().
I think is because sensor doesn't give any answer.
For i2c configuration i tried two ways:

Code: Select all

static const I2Config i2ccfg = {OPMODE_I2C, 100000, STD_DUTY_CYCLE}

and

Code: Select all

static const I2Config i2ccfg = {OPMODE_I2C, 400000, FAST_DUTY_CYCLE_2}

I tried to change slave address too with 0x33 and 0x3D that i found in ST library but i still have the same problem.
How can i fix it?
thanks

Re: iNEMO to Arduino

Posted: Mon Oct 13, 2014 8:58 pm
by RoccoMarco
Are you sure that you are using the right i2cdriver? Check on which one the mems is connected

Re: iNEMO to Arduino

Posted: Mon Oct 13, 2014 10:49 pm
by Deleterio
Yes the mems is connected to i2cd2, but i tried both anyway.

Re: iNEMO to Arduino

Posted: Mon Oct 13, 2014 11:02 pm
by RoccoMarco
Check the demo i2c fot stm32f1xx in testhal and try to edit it including the library. Actually, I have used the Gyroscope only on iNEMO.