Hacker News new | ask | show | jobs
by cuonic 3489 days ago
There aren't enough IO pins on an Attiny85 to measure the temperature and send it to another device wirelessly, right ?
3 comments

It has 6 pins you can use which should be more than enough.

Once I had two DS18B20 sensors (temp), one 1602 LCD (over I2C) and a PIR sensor to act as interrupt connected to a attiny85. One temp sensor shared the same pin with the I2C data line. I just had to make sure they weren't used at the same time.

This setup let me with two pins free, one of which I used as sink (ground) for the LCD, thus effectively being able to turn it off by pulling up the pin.

There are - two for power, two for the DHT sensor, two for RX TX, and you even have one left over (not counting reset pin)

I'm using serial from ATTiny85 to a ESP8266 as my wireless transmitter already: https://i.imgur.com/vZzGGZL.png but the ESP itself is probably the root of the power problem.

There are enough pins, the actual reason I didn't go with the Attiny85 is because of the Arduino libraries I'm using.

I think they needed an extra timer that the attiny85 didn't have.

Attiny84 wasn't exactly plug and play either, as I had to adapt the Arduino libraries code to it, but at least all the hardware was there.