WEEK 13

OUTPUT DEVICES

WEEK ASSIGNMENT

add an output device to a microcontroller board you've designed

I had some troubles with this assignment, so I made 2 practices the first was my main idea I wanted to play a small melody using my hello- world board, however for some  reason it doesn't work on it, but it does work using an Arduino Mega. My second practice is much simpler what I did is to activate a little motor using my hello world board.

 

You can download files HERE

As I still learning how to program I  looked for some code examples on the Internet and I found a very useful one, it uses a library with the necessary tones. Despite I wasn't familiarized at all with the use of libraries and how they work I can say that  this assignment has been very useful  to better understand them.

 

My first attempt to run the program on my Arduino board was  successful, for that reason I thought I would have the same result with my hello world board, however it wasn't so. The program never ran on it, after looking for an answer to that problem I found that a possible explanation is the kind of clock that the tone library requires, which is compatible with Arduino but not with my hello world board.

For my second practice I used my hello world board and I programmed it to activate a motor when a button is pressed.

first I used a motor that was too big for my board Voltage so I found a 5V motor which worked perfectly.

The program is almost the same that the one used to turn on a LED but I had to change the pin numbers and identify them on my board.