iNEMO to Arduino

Temporary and unofficial forum dedicated to the ST event "iNemo Design Challenge". Designers that are planning to use ChibiOS/RT for the challenge can use the forum to exchange code and experience.
Deleterio
Posts: 5
Joined: Sat Oct 04, 2014 11:37 am

iNEMO to Arduino

Postby Deleterio » Sat Oct 04, 2014 12:41 pm

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

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: iNEMO to Arduino

Postby RoccoMarco » Sat Oct 04, 2014 12:54 pm

Yes, I'm sorry but this is a problem :D . Please reply using english.

Deleterio
Posts: 5
Joined: Sat Oct 04, 2014 11:37 am

Re: iNEMO to Arduino

Postby Deleterio » Sat Oct 04, 2014 1:49 pm

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

Deleterio
Posts: 5
Joined: Sat Oct 04, 2014 11:37 am

Re: iNEMO to Arduino

Postby Deleterio » Sat Oct 04, 2014 1:58 pm

I'm sorry, I mean, i don't found library... :|

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: iNEMO to Arduino

Postby RoccoMarco » Sat Oct 04, 2014 2:19 pm

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

Deleterio
Posts: 5
Joined: Sat Oct 04, 2014 11:37 am

Re: iNEMO to Arduino

Postby Deleterio » Mon Oct 13, 2014 8:37 pm

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

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: iNEMO to Arduino

Postby RoccoMarco » Mon Oct 13, 2014 8:58 pm

Are you sure that you are using the right i2cdriver? Check on which one the mems is connected

Deleterio
Posts: 5
Joined: Sat Oct 04, 2014 11:37 am

Re: iNEMO to Arduino

Postby Deleterio » Mon Oct 13, 2014 10:49 pm

Yes the mems is connected to i2cd2, but i tried both anyway.

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: iNEMO to Arduino

Postby RoccoMarco » Mon Oct 13, 2014 11:02 pm

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.


Return to “iNemo Design Challenge”

Who is online

Users browsing this forum: No registered users and 1 guest