Closed cdcarter closed 11 years ago
Whoops, total rookie mistake. Totally ignore this concern, because I was way off base in my debugging. I'll be back.
Your methodology for the Arduino code is spot on, but as of the latest commit to the 0.12.0 branch serial
is a global variable pointing to whichever serial connection is talking to the computer. I did this to DRY up some code for boards with multiple serial connections, like the Mega and Due.
Changing serial
inside DinoSerial.cpp
to something else (maybe softwareSerial
) should do the trick.
I really like this idea, and that printer. Does it just need write support? Writing is straightforward, but reading will require something like the digital and analog listeners in the Arduino code. Follow that pattern if you want to try it. If not, do the write stuff and I'll handle the Arduino code for reading.
You got it, that was the mistake I was making. About to put together a pull request with the writing (works fine for me now, but haven't automated the testing yet). Hopefully tomorrow I'll find some time to dig through the reading. The printer only requires write support, but it can't hurt to have a fully usable SoftwareSerial implementation.
I'm trying to bring SoftwareSerial support to Dino (to eventually support the AdaFruit Thermal printer). I have a pretty good handle on what is going on on the ruby side of the code, and I think I have structured this addition in the proper way. However, it won't compile, for what I imagine is just a basic C++ issue I don't understand. I'm including the code, but the error occurs when trying to reassign the serial object to a new one once setPins is called.
I realize a pull request isn't the best way to get this on someones radar, but I'd love to try and figure out how to get basic SoftwareSerial support into the Arduino half of the equation, and I'm happy to hack away on the ruby side to get communication flowing both ways and a printer connected!
Email or Twitter for conversation!