Fun with Arduino - a Series of Introductory Videos

A series of tutorial videos for those who wish to learn more.
User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Fun with Arduino 03 Connect an External LED and resistor

#11

Post by RudyB » Sun Jan 06, 2019 10:41 am

The third video is online.

To control the on board LED is fun, but the real fun only starts when we can control external LEDs, like on a switch panel, or on a model railway layout. This video is about how to connect a LED and how to choose the value of the series resister we need to set the LED brightness.

In the next video we are going to control the external LED and we will simulate a night cycle on a model layout.

Link to Fun with Arduino 03 External LED and Resistor

Image

User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Fun with Arduino 04 Readable & Maintainable Code

#12

Post by RudyB » Sat Jan 12, 2019 10:02 am

The goals in this video are:
  • To make our code better readable and easier to maintain.
  • We imagine pin 8 operates 20 street lights on a model railway layout. They switch on when we press the button. To simulate a night cycle we want them to stay on for 3 minutes and then automatically switch off again.

Link to Fun with Arduino 04 Readable & Maintainable Code , #define, delay()


Image

User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Fun with Arduino 05 Connect More LEDs with Relay or FET

#13

Post by RudyB » Sun Jan 13, 2019 12:45 pm

Arduino outputs can only switch 20mA. If we want to control groups of multuple lights on our model railway layout, we will need some more 'oompf'. A 12V power supply will do great and we can use Relay or FET modules, controlled by the Arduino, to swicth the higher current / voltage. How to do this, how to wire this, is the subject of this video and article.

Link to Fun with Arduino 05 Connect multiple LEDs with a Relay or a FET


Image

paul1066
Posts: 37
Joined: Wed Jan 02, 2019 3:17 pm
Contact:

Re: Fun with Arduino - a Series of Introductory Videos

#14

Post by paul1066 » Mon Jan 14, 2019 11:34 am

Many thanks for this, I will be watching these with interest!

Tricky Dicky
Posts: 57
Joined: Fri Oct 05, 2018 6:49 pm
Contact:

Re: Fun with Arduino - a Series of Introductory Videos

#15

Post by Tricky Dicky » Tue Jan 15, 2019 1:57 pm

I like your style Rudy and I am looking forward to more videos. When you have finished with Arduino can I put in a request for a series on the Raspberry Pi, pretty please :mrgreen:

Richard

User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Fun with Arduino 06 Automatic Day & Night Cycle with on/off Switch and LED

#16

Post by RudyB » Thu Jan 17, 2019 12:46 pm

In this 6th video we are going to create a fully automatic day & night sequence, witch a toggle switch and an indicator LED on our switch panel. The day & night times are going to be configurable in seconds, which means we need some math to go to milliseconds.

Link to Fun with Arduino 06 Automatic Day & Night Cycle with on/off Switch


Image

User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Fun with Arduino 07 Day & Night Cycle, Multiple Light Groups, Random Times

#17

Post by RudyB » Sun Jan 20, 2019 11:24 am

Our day / night module of the previous video works perfect, but it controls just one light group. On our layout we probably have multiple groups ... houses, street lights, a railway station or an industry area. In this video we're going to see how we can control multiple light groups in a day / night cycle, while of course they do not switch all at the same time and also while making it non predictable.

Link to Fun with Arduino 07 Day & Night Cycle, Multiple Light Groups, Random Times


Image

Paul-H
Posts: 44
Joined: Thu Oct 04, 2018 9:37 pm
Contact:

Re: Fun with Arduino - a Series of Introductory Videos

#18

Post by Paul-H » Sun Jan 20, 2019 9:12 pm

Hi

A quick question I hope

I have a sketch written for the Arduino Mega that operates servo motors for use with turnouts.

I would like to try it on a UNO, how easy is it to get the sketch to load and work on the UNO.

Sorry to hijack the thread

Paul

User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Re: Fun with Arduino - a Series of Introductory Videos

#19

Post by RudyB » Sun Jan 20, 2019 11:11 pm

Paul, usually there are no major differences in the code as such, but the UNO has less I/O pins ... you'll have to carefully scan your code and change 'out of range' pin numbers into numbers that are in range for an UNO.

User avatar
RudyB
Posts: 29
Joined: Fri Jan 04, 2019 2:26 pm
Location: Netherlands
Contact:

Fun with Arduino 08 User Interface Serial.print()

#20

Post by RudyB » Thu Jan 24, 2019 3:39 pm

Our way of modifying the day / night cycle time seemed quite handy, but we do need to modify the code and upload it again every time we like to change the cycle time. Is there maybe an easier way?

Yes there is ... we can change the cycle time 'on the fly' via a User Interface. There are different solutions, with hardware otr with software. We're going to try them both. In this video we'll do the first preparations, writing text and numbers to the PC screen via Serial.print().

Link to Fun with Arduino 08 User Interface Serial.print()


Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest