Arduino Workshop for Beginners

2 posts were split to a new topic: Arduino + Servos

Hi Folks,

Brilliant Arduino Workshop for Beginners series. Very well put together!

Cheers,

Ian

1 Like

Hi. This is a great set of tutorials, and in the current quarantine situation, my students are getting a lot out of the videos. Thank you very much.

We noticed there was a slight bug in 5.2 Using SPI. The first line of the example code should read #include <SPI.h>.

Cheers
Ryan

Hi Ryan,

Thanks for the tip. I’ll add it to the list of edits to make to the site for the next update. Have a great day!

Bryce
Core Electronics | Support

Will the remaining chapters from chapter 6 be added to this page? Or are they located at another location?

Oooh that’s new. Looks like they’re in the works.

Thanks a lot for this course , that really helped me a lot sir !

I have a quesiton

How to develop a code to generate Fibonacci numbers until values less than 1023 (2^10 -1). (first 17 number in the sequence) using arduino ?

Thanks a lot for this course , that really helped me a lot sir !

2 Likes

Hey Menna,

The algorithm for generating fibonacci numbers is pretty simple: F_+1 = F + F_-1

Calculating the nth fibonacci is a good chance to explore recursive functions

1 Like

Hey Menna,

Welcome to the forum! :partying_face:

To take this even further I’d take a look at the Binet formula and calculation of the nth digit of fibonacci as a function, you may find it useful/interesting for your project.

https://mathworld.wolfram.com/BinetsFibonacciNumberFormula.html

Best of luck with it! Please let us know if you have any questions.

2 Likes

I get a message when i click on the video button on the page. See below, ā€œEr is een fout opgetreden. Probeer het later opnieuw. (Afspeel-ID: qXzhB7OD0kH-k5II)

Meer informatieā€ When go tho yutube and select your video i don’t have a problem.

By. Paul Guliker (Dutch)

The videos work for me :thinking: A screenshot of the error might help

Hi Paul,

Welcome to the forums :slight_smile:

Hmm, after running it through google translate it’s just saying ā€œAn error has occurred. Try again later.ā€ I’ve just double checked and it’s working on our end - might be something temporary or just an issue with your local network.

Does a Ctrl+F5 refresh fix it for you Paul?

1 Like

Hi Oliver,

2day the hyperlink to the video works fine.

So the problem is solvent i guess.

Thank you for your reaction.

Paul

3 Likes

Hi, I need to know how can we print the value in Serial Monitor of the program Blink Rate Control?

Hi Krishnaprasad,

Getting the serial monitor connected would be as simple as using this code instead:

int ledPin = 3;
int potPin = A0;

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

  // Initialising the Serial output with a baud of 9600 b/s
  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);
  delay(potValue);
  
  //Printing the value of 'potPin' every loop (the values will range between 0-1023 as the Arduino uses a 10-bit ADC i.e. 2^10 = 1024)
  Serial.println(potPin);
  
  // 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);
}

If you want to know how particular parts work let us know!
PS: here’s a link to the serial functions within Arduino’s IDE

Liam

3 Likes

Hi in the Functions tutorial is it possible to make a function at last just from printing the value and then call it on the loop?

3 Likes

Something like this?

int ledPin = 3;
int potPin = A0;

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

  // Initialising the Serial output with a baud of 9600 b/s
  Serial.begin(9600);
}

void loop() {
  // read the value of the pot and store it as potValue
  int potValue = analogRead(potPin);
  printIt(potValue);
  
  // 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);
  printIt(potValue);
  
  // turn led off and wait for the time equal to potValue
  digitalWrite(ledPin, LOW);
  delay(potValue);
}

void printIt(int val) {
  Serial.println(val);
}
3 Likes

Hi guys,
I just wanted to say thanks for an incredibly useful and well-presented tutorial course.
I had spent days online trying to work out how to approach programming my project, and I was becoming quite disheartened until I found this course. It’s just what I needed.
Best wishes
Simon

4 Likes

Hey Simon,

Glad you enjoyed it! It got me started quite a few years back too - Sam did a great job :slight_smile:

3 Likes