Closed justinledwards closed 10 years ago
Looks like the #ifdef statement for detecting different serial interfaces needs to be refined. In the meantime can you change Serial
on https://github.com/austinbv/dino/blob/0.12.0-wip/src/dino_serial.ino#L20 to serial
and see if that works?
It didn't do anything new. Should I compile it with debug and open the monitor and do anything? It oddly looks to be connected, I have to kill irb to be able to communicate with the IDE after trying to connect.
It should work once serial
ends up pointing to Serial1
for the Leonardo. You can open the monitor in the Arduino IDE and just type 99
. If it responds, no reason it shouldn't work with ruby.
On Tuesday, October 15, 2013 at 9:17 PM, Justin Edwards wrote:
It didn't do anything new. Should I compile it with debug and open the monitor and do anything? It oddly looks to be connected, I have to kill irb to be able to communicate with the IDE after trying to connect.
— Reply to this email directly or view it on GitHub (https://github.com/austinbv/dino/issues/65#issuecomment-26386192).
It blinks like it acknowledges something, but there isn't any output. I actually checked around online a bit and looks like I need to upgrade my IDE (1.5.2) there were some fixes in 1.5.4. I'm going to try a few things. I couldn't get any output from even basic serial examples.
Command - 99
Pin -
Value -
Responded with -
I was able to get it working by removing the checks at the beginning including hardwarserial and then changing all lowercase serial to Serial
#include "Dino.h"
#include <Servo.h>
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include "DHT.h"
Dino dino;
// Use the native Serial port on the Arduino Due
// Dino.h doesn't handle TXRX. Setup a function to tell it to write to Serial.
void writeResponse(char *response) { Serial.print(response); }
void (*writeCallback)(char *str) = writeResponse;
void setup() {
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
dino.setupWrite(writeCallback);
}
void loop() {
while(Serial.available() > 0) dino.parse(Serial.read());
dino.updateListeners();
Serial.flush();
}
I just got in my leonardo boards and wanted to see if dino worked well on them. I was able to change serial to Serial1 and get that error to go away, but I still get an error when trying to connect to the board.