Saturday, March 28, 2020

A Year of Learning - Arduino Programming



A couple of Birthdays ago JD got me this Arduino starter kit. I've been meaning to give it a try ever since. Well, March is the time!


You can read more about Arduino here, if you're interested. But it's an open source programming system that's accessible to everyone and supposedly easy to learn. As I understand it so far, which is not very much! :D


I used to work in an electronics factory years ago so a lot of the components in the kit look familiar but I've no idea what I'll be doing with them.


I'm following along with a series of tutorials by Paul McWhorter on YouTube. I really like the clear instructions and explanations in this video series. It's well made.




The first lesson was exciting. It was using this UNO R3 board and I programmed it (picture above) to blink an LED light on and off at varying speeds. I'm a programming genius already!!


I'm on lesson 8 now and I've learned to do various things including making a circuit on this bread board. I've moved on to blinking 2 LEDs, alternating them and  assigning different voltages to the LEDs to vary the brightness.

It's been mostly learning the basics of the programming code so far. I'm enjoying it but I'm also keen to build the bread board up a bit more with my box full of components!


Lesson 11 and I've just been learning about Ohm's Law and Potentiometers! This circuit allows me to change the voltage using the potentiometer which has a turnable knob on top of it. I'm getting the hang of the programming language now so I could write code that let me read the voltage through the Serial Monitor. The next lesson is making a dimmable LED using the potentiometer!


I'm on 24th March now and my latest Arduino project is this circuit that lets me measure distance with a Supersonic Sensor and display the distance on an LCD Module. It's not incredibly accurate but it works! As I move the pad away from the sensor the distance in inches goes up.


For the last project of the month I decided to try make a motored fan spin controlled by a joystick. I got it all set up, wrote out my code and pressed the joystick expectantly and nothing! It didn't move. I spent more time re-checking the connections and looking up a schematic to check my wiring against. It was all good. I double checked my code, all good too. It was very frustrating!

After reading some Arduino forums I decided I might have a faulty bridge motor drive (pictured below).


I took it out to inspect it and noticed that I had it in upside down. I replaced it the correct way and...


I've enjoyed my month of learning Arduino programming. It's a really fun way to play around with circuiting. There's lots more I could do with the kit I have if I had more time so it's well worth the price of £30 to get started.

The part of Arduino I've enjoyed the most is the problem-solving when something doesn't work. Going through the code to make sure all the semi-colons and curly brackets are placed correctly and re-checking schematics to make sure all the wires are where they should be.

It's a pretty cool way to get into programming. Give it a try!


Previously on A Year of Learning:

Smartphone Photography

Breadmaking

No comments:

Post a Comment

// following script until attribution comment is to add pinterest button