I started by going through the learning section of the Arduino website. I went through every step of the Basics section. What this achieved, was a much greater understanding of using the Arduino and the code itself. I was also constantly referring to the Reference page as this had a key to explain terms such as:
setup () {
}
loop () {
}
Before going through this, the terms above meant nothing to me, I now understand that 'setup' is a function that organises code before running the 'loop' function which is basically the main program which loops.
Once I began to understand the code a little more, I began asking questions to what I could change to actually make the Arduino do more than the example code. The first example that was successful was the DelayBlink example, which I got to blink multiple times at different times. Here's the code for that:

After achieving that, I began doing other things like getting it to light up connected LED's and changing which specific one to flash. For example, if I had an LED connected to port 6, I just changed the setep() to say:
void setup() {
void setup() {
pinMode(6, OUTPUT);
{
This was an important to my development I believe as this broke the boundary between reading code to creating code and understanding what I was doing.
I did achieve other changes in code, unfortunately I did not save these changes or document them because of my excitement.
No comments:
Post a Comment