From the course: Learning Arduino: Interfacing with Hardware

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Displaying random numbers and scrolling

Displaying random numbers and scrolling - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Hardware

Start my 1-month free trial

Displaying random numbers and scrolling

- [Instructor] Alright, so I've covered arrays and I've covered a for loop. So let's try and have some fun in trying to implement a for loop where we generate a random number and try to display that in the lcd. So I want you to go ahead and open the file 0108 lcd starter project. And in the starter project, I've kinda included things that we've covered in the previous example. So in line four, we initialize the pins and line six is the lcd function. So let's start by declaring an array type integer that has 27 values. So int and I'll name it as a random number array and it takes up to 27 values. So I've chose 27 because it's a number of the character that we can see in each line of the lcd type that we're using. Alright so we've initialized the array so let's go and start coding. So the very first thing that I wanna to specify is where I wanna show the numbers. Do I wanna show them in the first line or the…

Contents