Saturday, May 19, 2012

Week 7: Programming Environments for the Arduino

This week, we spent some time familiarizing ourselves with the Arduino UNO. For starters, the microprocessor's open-source software is quite different from languages we've previously used (our hard-earned MATLAB skills proved to be of little help...). We decided to start off learning the syntax with the classic beginner's programming exercise: the blink.

The Arduino software contains a few example programs for beginners like us. We opened up the blink program and after some installation troubles, the UNO's pin 13 LED began blinking as expected. For a little challenge, we also managed to make the Arduino blink Morse code (Figure 5):

Figure 5: The Arduino sending out an S.O.S.

With some early success, we then tried to tackle servo control, our week's goal. However, this involved using the breadboard and writing some more complicated code. For days, we would upload our code only to have nothing happen, not knowing whether our code or wiring was at fault. After scouring the web for more tutorials (the Arduino has a large community of users), we finally got our computer to perform a servo sweep (Figure 6):

Figure 6. Early servo control

Next week, we should be building a new (and less tangled) prototype of the glove as well as writing code to control the servo using the FSR.

No comments:

Post a Comment