Arduino Workshop for Beginners

Sam just shared a new tutorial: “Arduino Workshop for Beginners”




Welcome to the Arduino Workshop, where you’ll be able to follow our guided course which covers everything you’ll need to know in order to create your own Arduino projects and become a leveled up maker. My name is Sam and along wit…

Read more

If you found this workshop useful, the single most wonderful way to help us keep making more is to share or recommend it to someone :slight_smile:

We’re full time makers and are here to help! If you have any questions what-so-ever, then please post a new forum topic and we’ll dive into it straight away.

Hello, I’ve spent the last 2 days trying various Arduino courses,and couldn’t even get the LED to blink.I found your course about 2 hours ago,and have now got my LED blinking,and am ready to start the next section.Thanks very much! Regards-Ian Lennox

2 Likes

I completed your Arduino workshop 4.1 arrays. My LEDs would come on then off but that was it. The loop would not repeat. Even tried copying your sketch and two different Arduino Unos. Any help here?

Found a solution for the Arduino workshop 4.1 arrays. in the array to turn on the LEDs I made i=0. Maybe my version compiler does not do it automatically. Using Arduino 1.8.8 IDE. Thank you, Doug

1 Like

Hi Doug,

Good catch! There must have been a change in the compiler at some point, the code used to work as it was written. I seem to remember it working that way anyway, maybe I’ve just been programming too much with Python lately :slight_smile:

I corrected the code in the examples with your fix, and I did a little checking and i does need to be given a value for a ‘for’ loop to run.

https://www.arduino.cc/reference/en/language/structure/control-structure/for/

Thanks for letting us know!

Thank you Stephen, the workshop was a great way me to get back into embedded systems. Please pass on my thanks to all who were involved. Doug

Thanks for the feedback Doug! We work hard on these tutorials, and we are always happy to hear that they have helped out!

USING ANALOGUE PINS circuit is not working while the potentiometer led and UNO are all working

Hi,

Thanks so much for all the work you have put into these tutorials. My students and I are waiting for CHAPTER 6: ENTERING THE IOT REALM!

Are these videos available?

Cheers,

Matt

Hey @Matt61566,

Unfortunately, at the moment they aren’t available. Hopefully we will have them up soon.

Good afternoon,



Looking to get into programming and a friend of mine gifted me a “freetronics eleven”. I could not find any tutorials however after research it did say its arduino compatible. Would that mean the tutorials for arduino would be similar or same as the eleven or completely different? Any guidance will be appreciated!



Regards

Hey Sho,

There’s some differences between the capabilities of the freetronics eleven and a standard Arduino such as a Uno or a Mega. But it essentially is still the same thing and will still work for the majority of tutorials available, plus some eleven specific projects.

All the best and have a Happy New Year!

Bryce
Support | Core Electronics

I’m only in to Chap 2, Blink Rate Control lesson and not having any success. I can read and write code but electronics is a black art for me. The trimpot I have is different to the one in the lesson in that it’s round, with a flat edge where 2 of the pins are, 1 on each “corner” and the remaining pin is at the “top” of the circle of the pot. Is there a difference in trimpots? The result I’m getting is random pulses on the LED. I’m assuming it’s reading pin 3 and not A0? Apologies for the dumb question.

Hey David,

If you post your script that you’re using to control the Blink Rate, when I’m back in this forum I can take a look at it and see whether the issue is related to the syntax or scripting of the program. Don’t worry about apologizing we’re here to help!

Bryce
Support | Core Electronics

Hi Bryce,

Here’s the script, it’s a copy and paste from the Workshop Resources.

int ledPin = 3;
int potPin = A0;

void setup() {
// setup pin modes
pinMode(ledPin, OUTPUT);
pinMode(potPin, INPUT);
}

void loop() {
// read the value of the pot and store it as potValue
int potValue = analogRead(potPin);

// turn led on and wait for the time equal to potValue
digitalWrite(ledPin, HIGH);
delay(potValue);

// re-read the value of the pot and store it as potValue
potValue = analogRead(potPin);

// turn led off and wait for the time equal to potValue
digitalWrite(ledPin, LOW);
delay(potValue);
}

I have GND connected to the left pin of the trimpot, 5v connected to the right pin and A0 connected to the middle pin. I’ve removed the push button and the leads connected to it, ie GND and pin 2, thinking that that may make a difference. But it didn’t.

Hey Bryce, I took all the components and jumpers/leads off the breadboard, put them all back on, carefully following the wiring diagram - and it worked - for as long as it took me to write this. ???
Actually, even that’s not quite true. As I write, I’m testing more. With the trimpot fully counter clockwise, the LED “misbehaves”. With the trimpot fully clockwise, the LED performs correctly - most of the time. Turning the trimpot counter clockwise slowly, the LED does as expected. Until the trimpot is left, ie take your fingers off it. I wonder if I have a faulty trimpot?

1 Like

Hey David,

Potentially. I’d recommend using a multi-meter if you have one available and testing to see whether the resistance is jumping and whether there’s continuity across the pins. Also be sure to give the whole thing a thorough cleaning as that may be causing the issues when you stop applying pressure (or simply a faulty connection).

If not try running this modified code (will need reformatting) and see whether the jumpiness follows any patterns from the Serial viewer at 9600 baud

int ledPin = 3;
int potPin = A0;

void setup() {
// setup pin modes
pinMode(ledPin, OUTPUT);
pinMode(potPin, INPUT);
Serial.begin(9600);
}

void loop() {
// read the value of the pot and store it as potValue
int potValue = analogRead(potPin);

// turn led on and wait for the time equal to potValue
digitalWrite(ledPin, HIGH);
Serial.println(potValue);
delay(potValue);

// re-read the value of the pot and store it as potValue
potValue = analogRead(potPin);

// turn led off and wait for the time equal to potValue
digitalWrite(ledPin, LOW);
delay(potValue);
}

Hi Bryce,

Thanks for all your help. I’ve discovered that the trimpot doesn’t like sitting on the breadboard. It’s not making a reliable enough connection. It’s all good when I apply pressure to it but then it disconnects. So the LED ends up being fed from pin 3.

I ran your code and initially the serial monitor showed 1023, no matter the position of the trimpot. Then after turning the trimpot and taking my fingers off it, the potValue shown by the serial monitor is all over the place.

So I think it’s all down to a suspect trimpot.

Hey David,

That sounds like it could be the case. Make sure to let us know if you need any more help!

Bryce
Core Electronics | Support