Pro Trinket with XBee

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
PilotC150
 
Posts: 132
Joined: Sun May 04, 2014 9:39 pm

Pro Trinket with XBee

Post by PilotC150 »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Pro Trinket with XBee

Post by adafruit_support_rick »

Yes, you can connect the XBee to pins 0 and 1 without interfering with uploads.

User avatar
PilotC150
 
Posts: 132
Joined: Sun May 04, 2014 9:39 pm

Re: Pro Trinket with XBee

Post by PilotC150 »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Pro Trinket with XBee

Post by adafruit_support_rick »

Unfortunately, there's no such ifdef. Both the Uno and the Pro Trinket use ATmega328 processors.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”