wyager
Flashlight Enthusiast
- Joined
- Feb 10, 2010
- Messages
- 1,114
I'm not gonna get into the AVR/PIC argument (even though I agree with you ), but unfortunately your bluetooth+ftdi thing would not work for two reasons. 1:bluetooth dongles and ftdi are both USB slaves. They can't talk to each other. 2:the conversion from USB->serial is not as simple as you think. If you treated the bluetooth dongle like a serial device you would get nothing but gibberish. You would have to get a dedicated serial bluetooth or nothing would work. You could, however, use bootloader-based USB on an ATTiny, but this is very complex and requires some stuff that looks pretty tricky to me. I haven't tried yet, but it might take a while to figure out.I think AVR's are easier to program just because they tend to have more memory (program and ram) than the smaller pic's, so you don't have to code as tightly. Plus you can compile for them with gcc, there is the whole Arduino dev environment, etc. Bluetooth-serial converters seem to be crazy big and expensive. I was thinking of an using FTDI chip and one of those cheap tiny USB bluetooth dongles.
I am not using the hardware USI on the Tiny85 for the serial it's software serial. The code is based off Amtel aplication note and works well enough for just reciving a single byte level. The Helmet mount version is more complex as I need rx and tx to talk to the Ant+ radio chip so I have had to modify the board and the fuse programing to enable me to use the reset pin. I have it setup with a very nice little serial bootloader I found so I can still reprogram it.
The bike compute is based around an xmega128A1 board with a micro sd slot and serial to usb chip on it. I then have a host of other peripherals attached eg gps, barometer, 2 * i2c graphical lcd, rtc, etc.
There is a tutorial about bluetooth controll form a mobile handset for a light here. I have used the basic linear driver design in some of my smaller lights. I coded it in C rather than assembeler though as there is no need for assembeler with an 8k tiny.
Very cool. It seems you've worked pretty hard on this! I'll check out that mobile phone controlled light thread.