madleech / ArduinoCMRI

Arduino library for connecting your computer to your model railroad.
27 stars 18 forks source link

Update README.md to show Uno support #7

Closed k4kfh closed 8 years ago

k4kfh commented 8 years ago

Just to keep potential users from being turned away by having to find an obscure Arduino.

madleech commented 8 years ago

Good idea. I don't have a Uno to test with; have you tested with a Uno?

k4kfh commented 8 years ago

I talked to the JMRI devs and the issues with Serial that requires an FTDI chip have been fixed. I also tested the hello_world example sketch on a cheap clone Uno and a "real" Uno from Arduino.cc, and it works fine on both. My turntable sketch is running on an Uno as well, and it seems to work just fine. The only thing I haven't tested super thoroughly is the inputs, but I can test those if you want.

madleech commented 8 years ago

Ok that's great to know. Do you have a reference for the JMRI serial issue? If you could test the input that'd be good, a super simple test case is:

void loop() {
  crmi.process();
  cmri.set_bit(0, (millis()/1000) % 2 == 0);
}

... which will toggle input line 1 on and off every second.

k4kfh commented 8 years ago

Here is the JMRI issue (it was a long time ago, it's closed now): JMRI #259

I will test the input tomorrow and post the results here.

k4kfh commented 8 years ago

I just confirmed that inputs work fine on my Uno. Using the code you posted and setting up CMRI input bit 0 (line 1 for JMRI, since it doesn't like zeroes in hardware addresses), the Uno turns the input on and off regularly just as it should.

bobjacobsen commented 8 years ago

There's been some additional discussion about this on the JMRI developer's list. A user was confused by the comment in the README, and we again went through the issue. No trouble found. It would be good to get this PR merged to prevent anybody else from being confused.

madleech commented 8 years ago

Sorry guys for the delay, I did some additional testing on a Uno (328 with a 16u2 bridge) and Pro Micro (32u4) and both passed with flying colours. I'm sure there were issues with 32u4's at the time I wrote the library, but that was 3 years ago. I'm just glad everything works swimmingly now!

k4kfh commented 8 years ago

No problem. Glad to hear it worked out. Your library is fantastically useful!