Arduino-mega-firmata / archlinux / poco

1064/5000
Hello, I am confronted with two problems,
I use an arduino mega. To be able to take advantage of all the digital inputs (56) I use OF0.9.8 and I replace the Arduino library by this one
https://github.com/DomAmato/openFrameworks/tree/ofArduino_Updates/libs/openFrameworks/communication
Arduino Mega / Firmata pins limit?
Which worked imecably.”
But I upgraded my ArchLinux and Poco gives me an error:
Of_v0.9.8_linux64_Arduino / libs / poco / lib / linux64 / libPocoCrypto.a (OpenSSLInitializer.o): In the function "Poco :: Crypto :: OpenSSLInitializer :: uninitialize ()
I can put poco up to date … nothing works.
I tried to replace the Arduino library in my version of_v20170218_linux64gcc6_release but there it is
Of_v20170218_linux64gcc6_release / libs / openFrameworksCompiled / lib / linux64 / obj / Release / libs / openFrameworks / communication / ofArduino.o] Error 1

A track to walk ArduinoMega with nightly or to run 0.9.8 on archlinux up to date?
Best regards Bernard

Sad story … It’s urgent so I’ll go through puredata and Osc to retrieve the data from the arduino Mega.
But if someone has an idea, she will come!

Hello ,
I relaunch the subject,
I am looking for help to use firmata and arduino mega. It is very frustrating to have access to a code that worked and that after updating nothing works. The solution of puredata + osc does not really satisfy me.
An idea or direction?
Next I tried to use the serial communication for the arduino mega but I am confronted with other problems …

b.

I don’t have any Linux machines available at the moment and the error message from your above post doesn’t really tell me anything other than there was an error. Can you show a more detailed error report?

I am traveling for now and I have no Arduino mega. Back in 20 days I send you the details. Thank.

Hello,
Back from trip, I tested the firmata communication (v2.5) of the arduino Mega and OF (nightly builds of_v20170517_linux64gcc6_release) yesterday.
I replace the 4 files with https://github.com/DomAmato/openFrameworks/tree/ofArduino_Updates/libs/openFrameworks/communication.

When compiling the example firmata, you receive an error message:
OfArduino.cpp: 548: 34: error: ambiguous call to overload “writeByte (int)”
Return _port.writeByte (END_SYSEX)> = 0? True: false;
I commented on the function
// bool ofArduino :: isAttached () {
// // should return false if there is a serial error so the arduino is not attached
// return _port.writeByte (END_SYSEX)> = 0? True: false;
//}
And the example is compiled.
The communication is ok on the digital inputs below 21.
Ard.sendDigitalPinMode (2, ARD_INPUT); // OK
Ard.sendDigitalPinMode (48, ARD_INPUT); // do not answer (I did not all but all but 23/24/48/52)
Analogue side:
Ard.sendAnalogPinReporting (15, ARD_ANALOG); // ok (I did not suck them all)

an idea ?
(Google french to english translation)…

That error is generated by the ofSerial class since its not sure which writeByte function to call. I remember having the discussion with Arturo about this same problem over a year ago. I’ll see what I can do to make sure it connects and communicates properly

@DomAmato is there a PR for this? i remember talking about it but completely lost track of what happened with it

https://github.com/openframeworks/openFrameworks/pull/4261

we discussed it here but the PR is failing so I will have to make changes for it to pass I think. Also I don’t know that I made the changes you described to make it compatible with the OfSerial.writeByte()

probably the safest would be to change the current functions in ofSerial to use uint8_t and int8_t instead of char and unsigned char since those are less ambiguous

I changed the files so that the ambiguity is taken care of. Looks to be compiling in all versions so @dbwat you may want to test the newer version I uploaded.

super, it works.
I did not test all the pins simultaneously but I have a response of the digital pins beyond 21 (32, 42 …).
awesome. I worked with serial communication in the meantime but with the firmata, the work will be more flexible.

Thank you.