My question is about using the Serial lines for XBee with the Pro Trinket compared to the UNO.
On the UNO, I have my XBee hooked up to pins 2 and 3 using SoftwareSerial. Because the UNO uses the RX/TX lines to upload sketches, if I was using hardware serial I would need to disconnect the XBee to program the UNO. This part is correct, right?
Now with the Pro Trinket, since USB uses pins 2 and 7, can I hook my XBee up to hardware serial lines (0 and 1) without worrying about any conflict with uploading sketches?
Pro Trinket with XBee
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Pro Trinket with XBee
Yes, you can connect the XBee to pins 0 and 1 without interfering with uploads.
- PilotC150
- Posts: 132
- Joined: Sun May 04, 2014 9:39 pm
Re: Pro Trinket with XBee
Excellent news. Thank you.
That said, is there a preprocessor directive (#ifdef) that I can use to differentiate an UNO from a Pro Trinket so I can define the pins differently depending on my platform? I know with the Trinket there's __AVR_ATtiny85__, but what about Pro Trinket?
That said, is there a preprocessor directive (#ifdef) that I can use to differentiate an UNO from a Pro Trinket so I can define the pins differently depending on my platform? I know with the Trinket there's __AVR_ATtiny85__, but what about Pro Trinket?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Pro Trinket with XBee
Unfortunately, there's no such ifdef. Both the Uno and the Pro Trinket use ATmega328 processors.
Please be positive and constructive with your questions and comments.