Dear all
I need you help in the following issue: I have connected through I2C two ARDUINOs nano. Using the code fromArduino I2C test with Wire and they communicate correctly.
But, when I try to send data from ArduPilot on Pixhawk4 to slave Arduino nano using the following code:
add something like with_semaphore(i2c_dev->get_semaphore()) to your loop. But with out seeing the rest of the code its very hard to say what could be wrong.
I2C is coming to scripting soon-ish, the branch does work if you want to try it, you can then use lua scripting to send and receive without having to get into the main flight code.
Scripting can also already access serial ports if you could that instead. There are a couple of examples
Sorry no real update to the wiki, I’m afraid you have to use the examples and the main code currently. The plan it to auto generate the wiki in the same way the bindings auto generate code. But we haven’t done it yet…
We do have a Scripting section here on discuss and another over on discord, those are the best places to ask questions.
Thanks a lot for your answer! This is all my code, I try to run changed example Tools/Hello/Hello.cpp that send number through I2C. And could you please tell me why I need take the semaphore? (I’m noob in hardware programing).