-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
device.send() doesn't work in ofApp::setup() - PacketSerial #17
Comments
As an addendum, it might just be that I need to wait a little bit before sending data? If I do something like that, it seems to be working good.
|
It's hard to say what's going on without knowing the exact hardware setup / Arduino code. As far as I know you should be able to send serial commands in |
@bakercp Thanks for answering! Thanks! |
Hi,
I'm using this addon for an installation where I'm controlling multiple steppers and servos and it works great if the code where I send the message via serial is inside an event listener function (like mousePressed() or keyPressed() ), but not if I use it inside setup() or update().
To be more precise, this is the code that I'm using to send the osc message via serial (modelled on the OSC-SLIP packet example):
If I only put these 4 lines inside a ofApp::keyPressed(), it works ok. ✅
If I instead put them inside ofApp::setup() , after setting up the serial device, it does not work. ❌
Finally, if I put them inside ofApp::setup() and also inside ofApp::keyPressed(), even the keyPressed() event doesn't work. ❌
For reference, this is my send_osc_bundle().
The append_message() is the exact same code of the examples.
Any hint would be great! I've been struggling with this for quite a while.
Thanks!
The text was updated successfully, but these errors were encountered: