
Ask HN: How to learn small electronics and HW interfacing? - paultopia
I, probably like many of the people who read HN, am satisfactorily competent at slinging code but have absolutely no clue how to make that code talk to the physical world.  Like, suppose I wanted to attach a motion sensor to something: unless the sensor comes with a USB cable and a well-documented Python API, I&#x27;d be out of luck.<p>HN, what are your recommendations for strategies, books, projects, etc. to learn this stuff?
======
mkhcodes
As others have stated, start with an Arduino. Have fun.

But I would recommend as a next step is to find a component that is more
complex than an LED or Switch and with relatively good Arduino libraries
(e.g., a 2x16 LCD screen) and try to write your own driver for it (e.g., a
library that does all of the handling of the IO pins), using the data sheet of
the component to figure out how to use the IO pins. Feel free to look at the
Arduino library source code (or libraries for other languages).

I have done the same, using Rust and a Feather M0[1] and am now finding it
easier to look at the datasheet of the more complicated ATSAMD21[2]
microprocessor.

1\.
[https://www.adafruit.com/product/2772](https://www.adafruit.com/product/2772)

2\.
[https://www.microchip.com/wwwproducts/en/ATsamd21g18](https://www.microchip.com/wwwproducts/en/ATsamd21g18)

------
blendo
At age 62 (18 months ago) I took a 1 day “ham cram” and got my technician
license, and bought a couple of $25 vhf/uhf walk-in talkies. And played with
homemade antennas for a while.

A year ago I enrolled in my local community college’s Electronics 101 course,
which meant resistors, voltage, current, capacitors, and inductors. And
voltmeters and power supplies.

Six months ago I took Elec 102, which are transformers, diodes, AC to DC
rectification, transformers, and, voila, transistors.

Next step: microcontrollers, sensors, and relays.

Future: relearn imaginary exponents and Euler.

It’s a _big_ field!

------
saluki
I'm just getting started with arduino. This is the tutorial I followed for my
first project. Pick something that interests you and find a tutorial.

[https://www.reddit.com/r/PUBATTLEGROUNDS/comments/9q4rph/hea...](https://www.reddit.com/r/PUBATTLEGROUNDS/comments/9q4rph/heavy_duty_leaning_pedals/)

Other projects that are in the queue:

Similar to the first but with a sensor on the headset-
[https://www.hackster.io/news/easily-add-head-tracking-for-
an...](https://www.hackster.io/news/easily-add-head-tracking-for-any-modern-
game-04bb8e36d723)

Overhead Garage Door status indicator lights-
[https://www.instructables.com/id/Yet-Another-Garage-Door-
Sta...](https://www.instructables.com/id/Yet-Another-Garage-Door-Status-
Indicator/)

Roomba Virtual Wall-
[https://github.com/MKme/Roomba/blob/master/Arduino%20Code/Ro...](https://github.com/MKme/Roomba/blob/master/Arduino%20Code/RoombaArduinoVirtualWallEASY/RoombaArduinoVirtualWallEASY.ino)

You don't need lots of parts and most are inexpensive, for the soldering gun
and holder I got those at harbor freight, I order all the other parts off
amazon. I did buy one of elecrontics part kits with lots of small components
and a few breadboards.

------
h2odragon
Go get you one of the cheap Arduino clones (or several!) and a starter kit
with sensors and lights to play with. The Arduino Mega clones at $15 or less
are worth keeping a few in stock; and you'll never worry about burning one out
or leaving a thing assembled for a while to blink its light because its fun.

[https://www.adafruit.com/](https://www.adafruit.com/) is a good place to go
for information, parts, and excellent service.

------
Obsnold
I think arduino is a good place to start. If you want something slightly
different I like the teensy which is arduino compatible and can plug into a
breadboard. I'd pick up a basic electronics kit as well that includes a bread
board and a bunch of components and then you can actually make some basic
circuits with LEDs and sensors.

[https://www.pjrc.com/teensy/teensy31.html](https://www.pjrc.com/teensy/teensy31.html)
[https://www.amazon.com/s?k=basic+electronics+kit+for+breadbo...](https://www.amazon.com/s?k=basic+electronics+kit+for+breadboard&sprefix=basic+electronics+kit+&ref=nb_sb_ss_i_2_22)

------
dmavila
I recommend you also check out Ben Eater.

[https://eater.net](https://eater.net)
[https://www.youtube.com/beneater](https://www.youtube.com/beneater)

------
runjake
h20dragon mentioned [https://adafruit.com](https://adafruit.com). Just comb
through the info and tutorials on this site and grab yourself a basic Arduino
kit and get started.

------
iamcreasy
Documentations on Sparkfun is also very useful.

