Hi - so i've never used the romeo boardmy guess is that it would get treated like a miniboard. My guess is what you want to do is instead of the write then two byte read, just do the following:
Anyways you might want to check with a logic analysr what you expect to do is what you are doing - if nothing is getting sent there might be a physical issue too.
i try to run with :
end this not work....
i no have logic analyzer so now i stuck.
i read code for i2c of arduino and when before start to write call to func "beginTransmission()", and when end write call to func "endTransmission()".
so when i write to i2c with library "mraa" i need to do something like this?
dont have any updates.
i buy logic analyzer but this not help me.
what i chry to do is to conntrol on 4 dc motor.
i use this motor shield of arduino Motor Drive Expansion Shield Board Module L293D for Arduino Duemilanove Mega Uno | eBay
i have arduino and this work perfect, but when ichry to connect to edison this not work.
the problem is - for use this shield need to work with library "AfMotor", you can found that here adafruit/Adafruit-Motor-Shield-library · GitHub
and this library is not optimized for edison, so i try to write new code for the shield but this not work,
but i think this mistake to chry to work with this shield because is dont work with real protocol and take 9 pins (4 pwm and 5 digtal) for use.
so maybe you can tell me good way and what need to buy to controll on 4 motor dc?
Hi cocooi ;
Yes, the AfMotor was made for the Arduino and not specifically for the Edison itself.
Which PWM pins are you using in the board? Are you sure the pins are available? In the Edison with the Arduino Expansion board the availables by default are the pins 3,5,6 and 9 so you should check which pins for PWM are available in the Romeo board. Have you tried to create your own library/sketch to make this work? You were using MRAA in the beginning have you had better results using MRAA or the Arduino IDE?
i change the pins of pwm (i connect pin 11 in shield to pin 9 of edison), i create the pwm in mraa and now i have logic analyzer so i check the pwm and this exactly like arduino,
i think the problem is in other pins, i look in code of afmotor and its look like the other pins work like SPI, (have chip select clock and mosi, i dont understand what do the pin fourth).
so when i chry to write this in mraa, but I dont was able to synchronize the rhythm, the minmum rate of mraa is 100us between edge (for example: if i iset pin to low output and i sleep 20us and after sleep the pin set to high output, the real time between edge is 100us and not 20us) and in arduino is 10us,
when i go home i upload picture of logic analyzer