Getting Started with Arduino

@monumentalfolly I happen to be working on a program that will do just that. The goal is to output all 49 notes of the keyboard to the oscillator on pin 9. I’m not quite there yet, but it does make noise, lol.

int speakerPin = 9;

int Notes[] = {15,19,25,28,32,38,39,44,51,53,59,62,

char* CharNotes[] = {“C1”,“CS1”,“D1”,“DS1”,“E1”,“F1”,“FS1”,“G1”,“GS1”,“A1”,“AS1”,“B1”,

void setup ()
// pinMode (buttonPin, INPUT);
pinMode (speakerPin, OUTPUT);

void loop ()
{ for (int n = 0; n<=48; n++)
{analogWrite(speakerPin, Notes[n]);
analogWrite(speakerPin, 0);



I tried it and I got an error. Doesn’t

int buttonPin

need to be defined?

I added

int buttonPin = 1;

(I don’t have the button bit, but I do have the keyboard bit which I think would serve the same purpose?)

Adding that, and the code verifies, and works.

And actually, the keyboard bit doesn’t really do anything. I.e., with or without it at A1, the sequence of notes starts.

@monumentalfolly I Deleted the button part. It will play notes automatically over and over again.

@monumentalfolly I corrected the array in this code; the array shown now plays 3 times more notes than it did last week. I hope you are having fun experimenting with the Arduino. :smile:

Hi all,
do you have a procedure for W8 setup, I have some difficulties to connectect the COM port under arduino, the port is not recognize.

Hey @Supa,

Are you connecting the power module to the Arduino module while connecting to the computer? Also, what type of operating system are you using? I’m wondering if you have a port blocked. I could give you instructions to reset the module if you are still having difficulties.

Yes I have the power module plugged in the arguing while connecting to the computer. What is supprising for me by the way, as the USB can power the system like for the arduino UNO R3.
The port is detected ths first time and after a run he became unsuable.
I am running under windows 8 and not an expert of it.

@Supa, yes this is definitely possible! You would have to solder a couple of pads together to accomplish this. Did you read that on another post? Also, try resetting your Arduino with the following steps:

If this doesn’t work, try resetting the Arduino with these steps:

  1. Short the pins in the attached picture (i.e. directly connect them to each other with short strip of wire or a staple): The pins you need to short are a2 and d10. Place a small wire in those two pin holes and hold them tightly while continuing through the reset process.
  2. Connect the USB to the Arduino and turn the power on to the Arduino.
  3. Press ‘upload’ in the Arduino IDE with a code that is known to not cause issues.
  4. When the status bar changes from “compiling sketch” to “uploading…” remove whatever you are using to short the two pins.
  5. Your sketch should now successfully upload.

Let us know if this helps

Thanks for the tip in order to reset the arduino. I was aware of the procedure.
For the power, I do not feel comfortable to make some solder on it. I am going to test the USB power bit solution.

Have you attempted to connect the Arduino on another computer?

Yes and it works. Thanks

My IDE does not have the Leonardo board option, I’m using a Linux Ubuntu. I’m not sure what I should do about it! Please help! It says I need 140 characters to post this so, just ignore this bit! hfjfsjvfenjdbfkndfbnkgfdknfbkngbdndbfkndgbkjfgdkmdnighddjnhdnkjkkk

A3, A4, and A5? Is that right? Mine shows A2, A3, and A4. I actually need an A5 for the I2c protocol. Is there an A5 pin?

@manny_alvear Yes, mine also shows a2, a3 and a4; I mistyped above. Regarding I2c, you need to solder a couple wires to the two solder pads just below d0, labeled d2 and d3. Here is a discussion thread on this topic with pictures: Where is I2C Clock (Analog 5)

Where is the “attached picture” to show were to connect the wire to reset?

you need to change the board to the correct model as explained at the top of the page. Its Arduino Leonardo.

I just did a class that teaches the foundations of this, using the Threshold bit and the Latch bit I have always been a little fuzzy on the concept until I dug around and learned how to use those two bits.

1 Like

Hi there,

I have bought a arduino little bits recently. I have followed the step by step instruction to connect my arduino to my mac. However, it didn’t work. The connection between the mac and the arduino was broken after i have plugged in the cable for a while. Any help please??

How are you powering the Arduino? With the battery or mains adapter? You will need the mains adapter as the Arduino needs a lot of power.