PDA

View Full Version : The LED is not always greener on the other side



MichaelMeissner
09-20-2013, 10:59 PM
For some costume stuff, I was thinking about size of the microprocessor, so I picked up an Adafruit Gemma and Trinket (5v version). When I got them however, I discovered that the Teensy 3.0 wasn't that much larger then these Tiny85 chips (and in fact the Gemma is wider than the Teensy 3.0).

So for the things I a want to do, I don't see a reason to use these microprocessors, given the constraints that these microprocessors have.

If I was buying 10 or 20 of these, then yes the cost factor would be an issue ($8 vs. $19).

If I had a supply of lipo batteries, then not having to boost it to 5v (or regulated to 3.3v) might be a minor issue, but right now, I have AA batteries (2 or 4 rechargable AA boosted to 5v) or cell phone chargers that produce 5v. These batteries would work equally well with either microprocessors.

Similarly, if I was going to run for days/weeks at a time on a battery, I would imagine they might last a lot longer. For the stuff I want to do, I need 18 hours at most runtime, and then I can recharge at night.

By staying with the Teensy for all of the things I want to do, I have the USB serial port for debugging, I have a lot of pins, I have touch sensors, and multiple pwm/analog sensors. I can see, for some things, those microprocessors would be very interesting, but the LED is not always greener on the other side.

Mike Prevette
10-16-2013, 11:25 PM
Right tool for the job as they say. And the tools you're comparing here are apples and oranges. Like a solid no frills VW bug to a ferrari.

Some times you only need an Attiny85. Often I prototype with these dev boards and then roll the chipset into a custom board, in which case I use a board that features the processor I'm going to use in the final. The Digispark, gemma, trinket, etc are all great little boards that have opened up my use of the 85 for sure.

MichaelMeissner
10-17-2013, 05:51 AM
Right tool for the job as they say. And the tools you're comparing here are apples and oranges. Like a solid no frills VW bug to a ferrari.

Some times you only need an Attiny85. Often I prototype with these dev boards and then roll the chipset into a custom board, in which case I use a board that features the processor I'm going to use in the final. The Digispark, gemma, trinket, etc are all great little boards that have opened up my use of the 85 for sure.
Well yes. I'm not at the level of building my own system from chips. I know the theory, but at present, I'm not that interested in going down that route.

As I said, what makes the ATtiny85 guys nice is the price point (and in the case of the Gemma, the direct socket for a lipo battery). Rather than moving my Teensy 3.0 from project to project, I can just buy a couple of these guys and use them. However, as I said, the lack of some of the things available on the bigger boards is a problem.

With the #%! IDE, I can't do conditional compilation to decide whether to load Wire.h, i2c_t3.h, or TinyWireM.h depending on whether I am using the Uno, Teensy 3.0, or the ATtiny85. I suspect when I bite the bullet and dump the IDE, I will be happier, since I am a command line/makefile guy at heart, and the only IDE I really like is running make under Gnu Emacs. I have turned off editing in the IDE, so it is only used for just building and running the serial monitor.

Since I wrote the original article, I have figured out how to get the digispark running, and I seem to have bricked my Gemma/Trinket in that I can't seem to upload to them any more. So, I might continue to use the digispark, but the Gemma/Trinket will probably collect dust. Having to press the reset button (trinket/gemma) at just the right time is for the birds. I would prefer not to have to unplug and replug in the digispark, but at least I can consistantly do that to upload the boards. I do like the Teensy 3.0 where I don't have to (usually) hit the reset button or unplug it (sometimes however I do have to reset it).

pictographer
10-17-2013, 02:50 PM
You can take one more step away from the IDE by using your favorite terminal emulator instead of the serial monitor. On various hosts I've used cu, screen, putty, and picocom. Beware though, running them under an Emacs shell you may run into issues. Emacs terminal emulation is strange

MichaelMeissner
10-17-2013, 03:37 PM
You can take one more step away from the IDE by using your favorite terminal emulator instead of the serial monitor. On various hosts I've used cu, screen, putty, and picocom. Beware though, running them under an Emacs shell you may run into issues. Emacs terminal emulation is strange
I did that at times with the Uno (though on the Uno, it does cause the Uno to restart). I wasn't sure if the Teensy 3.0 used standard USB CDC drivers, or did its own thing. Time to do some tests when I get home.

I wasn't worried about terminal emulator, since in the worst case I can always just run the IDE just to do terminal monitoring, but just getting all of the pieces to do builds outside of the IDE.

Besides, I now have two displays I can hook up to the Teensy (a 0.96" Oled i2c display, and a 2.7" serial monitor that should arrive shortly), as well as using my bluetooth chip to talk to the phone.

PaulStoffregen
10-17-2013, 06:14 PM
I wasn't sure if the Teensy 3.0 used standard USB CDC drivers, or did its own thing.

It depends on what you've chosen in Tools > USB Type. If you use "Serial", it's USB CDC-ACM, just like Arduino Uno (except native USB, not limited to a slow baud rate). If you choose Serial+Keyboard+Mouse+Joystick, it's a composite device with CDC-ACM and HID interfaces, just like Arduino Leonardo (execept Leonardo doesn't do joystick). Both of these use CDC-ACM, so you can access Serial.print() and Serial.read() using any terminal emulator or other program that accesses serial devices.

If you choose one of the other options without Serial, then Teensy implements those, without CDC-ACM. In those modes, it "does its own thing" with a custom HID interface. The serial monitor is patched by the Teensyduino installer to be able to talk to that interface, so Serial.print still works in those modes. But it only works to the serial monitor. Standard terminal emulators won't see it.

MichaelMeissner
10-17-2013, 06:45 PM
Cool, I haven't really explored using the Teensy's USB capabilities. I recall Nick Gammon over on the Arduino forum had a set of buttons that would spit out text for the top 10 things in replying to people (i.e. can we see your code, did you connect the grounds, etc.)

PaulStoffregen
10-17-2013, 07:26 PM
I recall Nick Gammon over on the Arduino forum had a set of buttons that would spit out text for the top 10 things in replying to people (i.e. can we see your code, did you connect the grounds, etc.)

Now that's awesome. I should do something like that. But I probably only need 1 button... the one that begs people to actually post enough code+details to reproduce their problem!

Robin
10-17-2013, 08:22 PM
Cool, I haven't really explored using the Teensy's USB capabilities. I recall Nick Gammon over on the Arduino forum had a set of buttons that would spit out text for the top 10 things in replying to people (i.e. can we see your code, did you connect the grounds, etc.)


Now that's awesome. I should do something like that. But I probably only need 1 button... the one that begs people to actually post enough code+details to reproduce their problem!

That reminds of the Awesome button that Matt Richardson did. http://makezine.com/2011/04/08/the-awesome-button/

Hmmmm, maybe the spare Easy button should be hacked into a "Tech-Support-Made-Easy" button. :)

Nantonos
10-17-2013, 10:37 PM
Keyboard.print("Hello, IT. Have you tried turning it off and back on again?")


http://www.youtube.com/watch?feature=player_detailpage&v=PtXtIivRRKQ
BBC "The IT crowd" (http://en.wikipedia.org/wiki/The_IT_Crowd)