Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My favorite is the ATTINY 85. It's so cheap and yet, it can do almost most of the things you can do an Arduino. And yes, you can program it using the Arduino IDE as well.

How do you deal with the small number of pins? The NRF24L01+ uses SPI, which requires 4 pins. There are some guides on how to hook up an NRF with 3 pins. I think that only leaves 3 pins (besides VCC and GND)?

The ATtiny seems to be very attractive otherwise, because it works across a relatively large voltage range and does not use a lot of power.

Did you consider the ATtiny84, which has double the GPIO pins?



I did consider the ATTINY 84, in fact it was the 84 was the one I wanted to order. But due to a mistake, I had ordered the 85 instead. So, when they arrived, I didn't really feel like waiting another week to get working on this project, so I found an online hack/article that allowed me to use the 85s with just 3 pins. I can't remember exactly (it was a year ago), but something similar to this I guess:

https://www.instructables.com/id/NRF24L01-With-ATtiny85-3-Pi...


I have no clue what your project is, but a lot of us like the ESP8266/ESP32 which are ~2$ and ~5 per module, or around double with their dev kits. Get's you lots of GPIO + wifi.


I do like them, I have a supply of Wemos D1 Minis ;). I also like the Robotdyn Blue Pill (STM32, fun for playing with Rust).

Regardless, I find the minimalism of the ATtinies interesting too, but haven't made the plunge yet.


> Robotdyn Blue Pill (STM32, fun for playing with Rust).

$3.49 is great, nice find. Hopefully now that Espressif has unveiled their fork of LLVM you (as well as myself :P) will be able to use Rust on the ESP chips soon enough.


For regular STM32F103C8T6 blue pills, of course there are lots of sellers on AliExpress that go lower. The lowest right now [1] is listing them for $1.53.

That said, it's really confusing how much flash memory are on these. The community seems to find that they list as 64 KB, but in reality ST has been shipping the part with 128 KB without saying. I have two black pills (slightly different board, same MCU) but the one I tested only has 64 KB. :(

1: https://www.aliexpress.com/item/32839140960.html?productId=3...


But the RobotDyn Blue Pill has the correct USB resistor values. Also, a lot of unnamed Blue Pills come with bad voltage regulators. My time is worth the extra $2 ;).


I wrote a firmware that lets me turn any attiny into a gpio-to-i2c and supports in-place-upgrade also over i2c.

Now I have up to 20 extra gpio for 0.5$ or so. This is not very hard.


The thing with this kind of setup is that it almost always works out cheaper to just buy a microcontroller with more pins. For example, you can easily get hold of 48 pin Cortex M0 parts for under $1.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: