Yes, why not. And here is what I did …
(this will be series of posts about what I did with ATtiny85/Tinusaur and ESP8266 WiFi module)
First, what could be accomplished with such limited device as ATtiny85? It has 8 pins, 2 of which are for the power (Vcc and GND), one for the RESET (pin 1 – PB5), another one potentially for the OWOWOD debugging (pin 2 – PB3) through serial line, so there are 4 pins left: PB0, PB1, PB2, PB4.
ESP8266 module uses UART to communicate so it would require at least 2 pins to work – URxD and UTxD.
There is also CH_PD pin that controls the chip and could power it down.
At first it may look that this takes another 3 pins out but not really.
If we use the CH_PD to disconnect the ESP8266 module we can use the same pins for other purposes like connecting additional I²C devices to the micro-controller. This is what I did.
What are the challenges?
1) There’s no UART on ATtiny85 so I had to write my own that takes advantage on the built-in USI unit. The library is called USIUARTX and will be presented in another blog post. The source code will be uploaded at https://bitbucket.org/tinusaur/ very soon.
2) There’s no I2C on ATtiny85, not even the TWI (Two Wire Interface, basically I2C) that some other Atmel chis have, so I had to write my own that takes advantage on the built-in USI unit. The library is called USITWIX and will be presented in another blog post. The source code is already available at https://bitbucket.org/tinusaur/usitwix. The BMP180TINY library (Source code at https://bitbucket.org/tinusaur/bmp180tiny) uses it to communicate with an BMP180 pressure sensor.
That’s it for now.
My next post will be about the above mentioned libraries.
There is a lot going on with the Tinusaur Project. It’s just that we did not have much time to write about it.
Expect in the next few days: new software projects and libraries; new shield boards; many other things.
Some of the people who received the Tinusaur Starter kit wrote us that it isn’t that easy to figure and remember how to put and use the 2 small 2×1 headers for the external power and the battery on/off. So, we decided to make a small change – have those in different colors.
PS1 (external power source) is now red.
BS1, BJ1 (battery switch and jumper) are now yellow.
Your feedback is really valuable to us.
Dear friends, I’m glad to inform you that all the parts and the boards finally arrived.
So we’re ready to offer the Starter Kit to those that are interested.
Boards were produced by OSHPart – they look great, as usual.
We also received small batch from SeeedStudio – cheaper but still look good.
We are now preparing the purchasing option – a PayPal button or may something more complex – we haven’t decided yet. There is this “Start your own online store front” list of options that we consider looking at. Any feedback or shared experience we will appreciate very much.
Initially we will put up for sale very small batch – 20 or so packages – we don’t know what the interest will be, but we have the capacity to ship about 80 more.