tag:blogger.com,1999:blog-4980715907911940082024-03-23T03:14:17.486-07:00Blind Arduino BlogThe Blind Arduino Blog is a collection of news and information about blind makers working with Arduino. It includes tutorials, advice, and recommendations of particular interest to blind people working with electronics and microprocessors. The Project is based at <a href="http://www.ski.org/project/blind-arduino-project">The Smith-Kettlewell Eye Research Institute</a> and includes a number of partners and collaborators, some of whom are contributors to this blogJoshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-498071590791194008.post-23399894311382460642018-11-29T13:45:00.001-08:002018-11-29T13:45:07.311-08:00Sonification and Simple Auditory Displays with ArduinoSonification and Simple Auditory Displays with Arduino
<p>Stand-alone Arduino projects built by sighted people often use LEDs and LCDs as output methods. The color and placement of an LED might indicate a state or activity, while quantitative data like numbers or a simple graph are often presented on an LCD.</p>
<p>Of course, neither of these methods works well for blind makers or users. Instead, we prefer non-visual interface options such as sound, speech, or haptic feedback. I recently posted an article on
<a target="_blank" href="http://blarbl.blogspot.com/2018/09/servometers-interactive-tactile-gauges.html">using servos for quantitative haptic feedback (servometers)
</a>, so now I'd like to take a step back to introduce some simple accessible Arduino output techniques using sound. Other output methods such as vibration and text-to-speech are also extremely useful and articles on those topics are forthcoming.</p>
<h4>What is Sonification and Auditory Display</h4>
<p>An auditory display is exactly what it sounds like – the use of sound to represent information. There are lots of ways of doing this including alarms, alerts, transformation of data into sound, etc. Sonification is a type of auditory display that uses sound (not speech) to represent quantitative information. Usually sonification uses a specific set of sounds and varies the qualities of the sound depending on the information being represented. Since it is really easy to manipulate the pitch of a tone, many sonification techniques have used pitch to represent information. In other words, by associating a particular variable with the pitch of an output sound, we can make an auditory display that represents what is happening with that variable. If the pitch goes up it lets us know that the value of the variable increased. If the pitch goes down then we know the variable decreased. Of course, pitch is not the only sound parameter that can be used, but it's extremely easy to implement and control with the Arduino. It's also relatable for most users and it's classic, so that's what I'll be discussing in this article. Other parameters for sonification include timbre characteristics, pulse rate, and many others. Sound level (volume) is generally not recommended as a display parameter because users usually like to control that. You can learn much
<a target="_blank" href="https://en.wikipedia.org/wiki/Sonification">more about sonification and Auditory Displays from Wikipedia
</a>, or with a little additional Googling.</p>
<h4>Making Sound With Arduino</h4>
<p>You can buy a number of fancy shields for playing sounds and music with an Arduino, but we are going to confine the discussion to making sound with the
<a target="_blank" href="https://www.amazon.com/gp/product/B008GRTSV6/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B008GRTSV6&linkCode=as2&tag=blarbl08-20&linkId=cb8f1530f88e5541a1c0f6a87074755c">classic Arduino Uno (available from Amazon)
</a> without any additional hardware other than an unamplified
<a target="_blank" href="https://www.amazon.com/gp/product/B00XW2NPTG/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00XW2NPTG&linkCode=as2&tag=blarbl08-20&linkId=1473b59cb83c88e458311577ab16e1c7">8Ω speaker (also available from Amazon)
</a>. You can also use a piezoelectric buzzer, but the resulting sound quality is rather disappointing. Although buzzers are certainly loud enough (generally too loud), the quality of the sound they produce can be rather hard on the ears. They are also not reliable when reproducing pitch. I strongly prefer using a small, 8Ω speaker, sometimes with a 100Ω resistor in series with it if you are worried about drawing too much current.</p>
<p>There are two simple functions that are generally used to produce sound from an Arduino. These are
<a target="_blank" href="https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/">analogWrite()
</a> and
<a target="_blank" href="https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/">tone()
</a>. Both of these functions use Pulse Width Modulation (PWM), so in trying out the following examples, be sure that one wire of your speaker is connected to a digital pin that can support PWM (i.e., 3, 5, 6, 9, 10, or 11 on an Arduino Uno). The other speaker wire should be connected to GROUND.</p>
<h4>Simple Beep Sonification with analogWrite()</h4>
<p>The
<a target="_blank" href="https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/">analogWrite() function
</a> lets you use a speaker to make audible beeps of various durations and intensities. This is really useful for providing simple auditory feedback for lots of projects. For example, you can use one, two, or three quick beeps to let the user distinguish between three different states or modes. You can make a long beep to mean one thing and a short beep to mean another. Beep rate can be used as an auditory display for a smoothly varying value with the time between beeps corresponding to the value (or its inverse) being represented like a Geiger counter.</p>
<p>The analogWrite() function is part of the core Arduino library. When used it tells the processor to start alternating the pin state between low (0V) and high (5V) at about 1000 times per second depending on which pin you are using. It continues to alternate low and high at this rate until you tell the pin to do something else. This alternation between low and high becomes a tone when you connect a speaker (or piezoelectric buzzer) to the output pin.</p>
<p>analogWrite() takes two arguments: the pin number and a number between 0 and 255. The pin number obviously tells the Arduino which pin to use, but the second argument tells the Arduino how much time to spend in the high state and how much time to spend in the low state. The percentage of time that the pin spends in the high state is called the Duty Cycle. A value of 0 for this second argument corresponds to a duty cycle of 0% (none of the time is spent in the high state), while a value of 255 tells the pin to spend all of its time in the high state (100% duty cycle). In the middle of the range at 128, the pin spends equal amounts of time in the high state and the low state (a 50% duty cycle). The cool thing about this is that, for sound, it gives you digital control of how loud the sound is. Low values for the duty cycle are quieter and high values are louder. Above approximately 10% duty cycle the loudness no longer increases, but using values below about 30 lets you adjust the sound level quite nicely. This is particularly useful if you are using a piezoelectric buzzer instead of a speaker because they can be extremely loud and obnoxious at full volume.</p>
<h5>Sonification Example with analogWrite()</h5>
<p>The following sketch illustrates how to use analogWrite to make a beep whose volume can be controlled while the auditory display demo uses the rate of the beeps to sonify the sensor reading.</p>
<div class="code">
<pre>
/**********
* This sketch demonstrates how to use analogWrite() to make audio beeps,
* how to implement a simple, beep-rate auditory display,
* and how to adjust sound volume.
* For details on analogWrite(), see:
* https://www.arduino.cc/en/Reference/AnalogWrite
* Note that pins 5-6 on Uno and similar boards will give you a tone close to 1KHz
* while other PWM pins will give you something closer to 500 Hz.
*
* Wiring:
* Speaker -- 1 lead to pin 9, the other to ground.
* 10K volume pot -- 1 end to 5V, 1 end to ground, arm to A0.
* 10K sensor pot -- 1 end to 5V, 1 end to ground, arm to A1.
*
* By Josh Miele for the Blind Arduino Project, 09/17/2018
*//////////
//pin assignments
const byte volPotPin = 0; //pot to control volume
const byte sensorPotPin = 1; //pot to simulate a sensor reading
const byte speakerPin = 9; //attach an 8 ohm speaker to this PWM pin
//Sound parameters
int maxVol = 20; //maximum volume
int beepDur = 50; //Beep duration in milliseconds
//Delay timing parameters
int minDelay = 25; //Minimum delay in milliseconds
int maxDelay = 1000-beepDur; //max delay corresponds to 1 beep per second
void setup() {
pinMode(speakerPin, OUTPUT);
} //end of setup
void loop() {
//read from volPot to set the duty cycle of the beep
//use map to get the duty cycle param into the right range.
int dutyCycle = map(analogRead(volPotPin), 0, 1023, 0, maxVol);
delay(1); //for stability)
//read sensor pot to simulate a varying parameter
//This could be any dynamic value from sensors, serial, or cloud.
//Use map to scale the input to the right range of delays
//Note that this should be exponential, but...
int delayTime = map(analogRead(sensorPotPin), 0, 1023, minDelay, maxDelay);
//Make the beep
analogWrite(speakerPin, dutyCycle); //Turn on the sound
delay(beepDur); //Wait for the length of a beep
digitalWrite(speakerPin, LOW); //Turn off the sound
delay(delayTime); //between minDelay and maxDelay
} //end of main loop
</pre>
</div>
<h5>Notes About Designing Auditory Displays with analogWrite()</h5>
<p>If you are planning to implement a simple auditory display using beeps, here are a few pointers. Generally speaking people are good at distinguishing between long beeps and short beeps (think of Morse Code), but are not so great at estimating beep duration, so it's not recommended to use beep duration as a display parameter. On the other hand, people are pretty good at hearing very slight differences in timing between beeps(e.g., tempo). This means that varying the delay between beeps makes a pretty good auditory display. As mentioned above, using sound level as a display parameter is discouraged for a variety of reasons. The sketch above has a couple of flaws, most notably, the use of delay prevents the auditory display from responding immediately to changes in the sensor value. This can definitely be dealt with, but it would make the code much more complicated, so it is left as an exercise to the student. The other issue with the sketch is that we vary the delay linearly with the sensor input, but really it should be exponential in order to make the display more usable. More about that in the next section.</p>
<h4>Sonification with Tone()</h4>
<p>analogWrite() is great for just making an unspecified beep, but it provides no control over the pitch of the sound. For that we need to use
<a target="_blank" href="https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/">tone()
</a>. This built-in function allows us to use the same speaker or piezoelectric buzzer to play a tone at a particular frequency, so we can now use pitch as a quantitative auditory display parameter.</p>
<p>The
<a target="_blank" href="https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/">tone() function
</a> accepts three arguments: pin (the pin the speaker is attached to), frequency (in Hertz), and duration (in milliseconds). If you omit the duration parameter, the tone plays until you actively turn it off with another function like
<a target="_blank" href="https://www.arduino.cc/reference/en/language/functions/advanced-io/notone/">noTone()
</a> or digitalWrite(). For example, if you have your speaker attached to digital pin 9 and you want to play a middle A for 1 second, the command would look like this:</p>
<p>tone(9, 440, 1000);</p>
<h5>Some Notes on Frequency, Pitch, and Perception</h5>
<p>It's important to understand the difference between frequency and pitch. If all you want is a tone that gets higher and lower as you vary a parameter, then it's fine to simply use linear frequency. Increasing frequency makes a tone sound higher, and decreasing frequency makes it sound lower, but this simple approach leaves most of the pitch change at the bottom of the range. It is as if you have a speedometer that gives you great sensitivity at slow speeds, but at higher speeds it gets less and less accurate. To make the most use of the auditory display, we should have the pitch change equally distributed over the range of frequencies we want to use.</p>
<p>Frequency is the number of cycles per second of the sound. It's measured in hertz (Hz). 1Hz is one cycle per second. The audible range of frequencies for humans is approximately 20Hz to 20,000Hz, with most people losing some range at the top with age.</p>
<p>Another important thing to know is that we perceive pitch in cycles called octaves. The notes of any scale will repeat as we play up through the scale to the next octave, and the next, and the next. Every note has a fundamental frequency associated with it (e.g., middle A if 440Hz). Doubling that frequency gives you the fundamental frequency of that same note in the octave above, while half of that frequency gives you the fundamental frequency of that same note in the octave below. For example, 220, 440, and 880 all have the pitch of A, and are in three consecutive octaves, but the frequency difference between them is far from equal.</p>
<p>Putting it in mathematical terms, there is an exponential (or logarithmic) relationship between frequency and pitch.</p>
<p>This matters because humans are extremely used to hearing tones as pitches. Unless the exponential relationship is used, differences at higher frequencies will sound much smaller than differences at lower frequencies. For example, imagine we hear a tone at 100Hz. If we increase that frequency by 100Hz up to 200Hz, it has gone through an entire octave of change. On the other hand, if we start with a tone of 800Hz and increase the frequency by the same 100Hz up to 900Hz, the pitch only increases by a little bit – much less than an octave. This means that the same amount of increase in frequency sounds much smaller when it's a higher frequency than when it is a low frequency. Using the exponential relationship fixes this problem.</p>
<p>Putting it a different way, and using some musical terminology, if you want the pitch of your sound to change by a fixed interval for a fixed input, you need to include the exponential factor.</p>
<p>In fact, it turns out that most of our perceptions follow this exponential relationship, including our ability to hear tempo changes. This means that in our previous example we really should have used an exponential function instead of map to control the delay. This is psychology's well-known Webber Law which basically says that as stimuli get bigger (e.g., intensity, frequency, duration, etc.), you need a correspondingly larger difference in that stimulus in order to notice it as much.</p>
<h5>Pitch Sonification Example with tone()</h5>
<p>In the following example, tone provides output for a value being read from an analog input. In this case the input is connected to a potentiometer for demonstration purposes, but we could just as easily use a sensor of some kind, or be reading a value from a serial or cloud-based device. The point is that we're using tone() to represent a dynamically varying, real-time input. Note that this is not that different from the PitchFollower example sketch included with the Arduino IDE. Unlike that example, though, this version offers two different pitch Sonification methods – simple frequency variation, and a more sophisticated (better) linear variation of pitch with input value. This sketch also provides an easy way of turning off the sound to preserve your sanity.</p>
<div class="code">
<pre>
/*
* Simple Sonification
* This sketch demonstrates the basics of using tone() for sonification.
* It includes a quick-and-dirty qualitative approach using the value of
* analogRead() as the frequency. It also illustrates a more
* sophisticated approach, using the exponential function to keep
* display pitch linear with input value.
* Wiring:
* 8 ohm Speaker -- one lead goes to pin 9, the other goes to ground
* 10K linear Pot -- One end goes to 5v, the other end goes to ground.
* The arm of the pot goes to A0.
* Josh Miele for the Blind Arduino Project -- 10/24/2018
*/
//Specify pin assignments
const byte speakerPin = 9; //Needs to be a PWM pin
const byte potPin = 0; //any analog pin will do
//Set up some variables for the exponential sonification
float minVal = 10; //Minimum sonified value
float maxVal = 1023; //Maximum value from analogRead()
float octaves = 3.0; //how many octaves in the display range?
int baseFrq = 100; //Lowest display frequency
void setup() {
pinMode(speakerPin, OUTPUT);
} //end of setup routine
void loop() {
//Read the pot and play the tone.
int potVal = analogRead(potPin); //we get vals between 0 and 1023
//if the sensor value is above 10, then we play a tone
if (potVal > minVal) {
/* There are two different sonification versions below.
* Only one should be used at a time, but try experimenting
* with each by uncommenting it and commenting the other.
* The first version simpley uses the output of analogRead()
* as the frequency value. This has most pitch change in the
* bottom of the range.
* The second version uses an exponential function to
* output equal pitch change for equal input change
* throughout the range of analogRead() values.
* Try also experimenting with different values of octaves and baseFrq
*/
tone(speakerPin, potVal); //Frq is exactly equal to sensor input
// tone(speakerPin, baseFrq*pow(2, (octaves*(potVal-minVal)/(maxVal-minVal)) ) ); //exponential sonification
} else {
//turn off the sound when the pot is all the way down.
noTone(speakerPin); //To preserve your sanity!
}
delay(10); //Just for stability...
} //end of main loop
</pre>
</div>
<h4>Applying Simple Sonification</h4>
<p>There are lots of ways to use tone() and analogWrite() to represent data. After reading this article you can probably imagine how we have used similar approaches to build auditory continuity testers, obstacle detectors, carpenters levels, volt meters, and many other devices. You can combine these simple Sonification techniques to create pitch displays that (for example) pulse in a particular region of the display to indicate critical values. Other displays use tones that are audible only when the input value changes, but are silent otherwise. The simple techniques described above can be used as the building blocks to form some extremely sophisticated auditory display tools. Please let us know how you use them!</p>Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com7tag:blogger.com,1999:blog-498071590791194008.post-16084943753859118542018-09-14T16:20:00.000-07:002018-09-14T16:20:14.192-07:00Products and PurchasesOccasionally we provide links in the Blind Arduino Blog to products we think might be useful for blind makers. We thought that we might be able to use these links to help support our efforts, so we've gone ahead and become an Amazon Affiliate which gives us a small percentage from your purchase when you buy stuff from Amazon through the links on the blog. We're not going to go crazy with this or anything, but we did want our readers to understand that we're doing this, and that when you use the product links in our posts to buy things through Amazon, you're helping us continue to do what we do. Thanks!Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com0tag:blogger.com,1999:blog-498071590791194008.post-92064431538285258042018-09-13T15:55:00.000-07:002018-09-13T16:38:03.537-07:00ServoMeters -- Interactive Tactile Gauges with Servos<h4>The Basics</h4>
<p>Makers loves servos and, perhaps not surprisingly, some of my favorite servo applications are for building accessible haptic displays such as interactive tactile dials, gauges, and meters.
</p>
<P>Servo motors are ubiquitous in hobby robotics. They are awesome little motors that incorporate a feedback system, making them extremely easy to use with Arduino and other microcontrollers. A few decades ago they were quite expensive, having most applications in aerospace or other fancy fields, but with the growth of hobby robotics and the maker movement, to say nothing of the popularity of RC vehicles, the size and price of servos have come down significantly at the same time as the reliability has gone up. Today you can buy little servos for well under $10 each and they are well supported with a <a href="https://www.arduino.cc/en/Reference/Servo">Servo Library</a> in the Arduino environment.
</p>
<P>Servos come in two basic flavors: those with a range of motion of 0-180° and those that can rotate freely through 360°. Both kinds tend to be small rectangular boxes with a motor shaft sticking out of one side capable of mating with a variety of wheels, gears, arms, and other shapes designed to apply torque in one way or another. 180° servos have a built-in position sensor that lets you set the motor shaft to a specific orientation. Continuous rotation 360° servos have similar sensors, but for motor speed and direction instead of position. We will return to the topic of 360° servos presently. There are many other kinds of specialized servos, but for now we will stick to discussing these two types.
</p>
<P>The 180° servos are capable of rotating their shafts through a half rotation and back again like a windshield wiper. More interestingly, you can tell the 180° servo to go to any position between 0° and 180°, and it will faithfully turn the shaft to that orientation and keep it there, even if you physically try to turn it away from that orientation. It's able to do this because it has a built-in sensor (usually a potentiometer) that lets it know what position it's in – if you try to force it away from where it's supposed to be, it tries to move back. This means it can reliably be placed at a specific angle and be counted upon to stay there.
<h4>Which Wires Are Which?</h4>
<p>Before continuing with the discussion of using servos for accessibility we need to make the servos themselves accessible. Most servos have a color-coded, 3-conductor ribbon cable with a 3-pin female connector on the end. The colors are great if you can see, but if you can't, you'll need to know what's what with the wires.
</p>
<P>Place your servo on a flat surface in front of you with the shaft pointing up and the ribbon cable toward you, making sure that the cable lies flat and is not twisted. In this configuration, the wires in the cable are FROUND, POWER, and SIGNAL from left to right for most servos. Check your product documentation if you are using an unusual servo.
<h4>Analog Gauges and Why They're Cool</h4>
<p>Analog gauges have many distinct advantages over digital or text-to-speech for quantitative output. They are dynamic so readings can be constant rather than sampled at longer intervals. For example, a gauge that wiggles every time a wire is touched lets you know immediately that there's a loose connection, whereas an instrument with only a digital display might not catch this. A quick glance at a gauge lets you know if you are within an acceptable range much more efficiently than a digital readout, and a slightly longer look at the gauge gives you a reasonably accurate quantitative reading. All of these benefits apply to tactile versions of gauges as well.
</p>
<P>Blind people have a long history of removing the glass from gauges in order to be able to read the position of the needle by touch. This worked great for analog alarm clocks which were designed to be thrown around a bit, but in most cases the glass is there for a reason: the needle is not designed to be touched. A delicate needle can move while being touched leading to a false reading. Worse, touching the needle could cause a delicate measurement instrument to permanently lose its calibration, leading to a long future of incorrect readings.
<h4>Meet the ServoMeter</h4>
<p>The 180° servo is an ideal tool for building reliable and inexpensive gauges and meters designed to be touched – a category of displays I have dubbed ServoMeters. The robustness and pushback of the 180° servo is perfect for building tactile gauges, and the addition of tactile markings or braille numbers around the dial makes for an inexpensive, simple, and powerfully quantitative tool.
</p>
<P>Servos are also much less expensive than TTS boards, putting tactile displays within easy reach of even the most financially strapped blind maker.
</p>
<P>The most basic example of a servometer can be found right in the libraries directory of your Arduino development environment under Servo > Examples > Knob. The Knob.INO sketch demonstrates how to set the position of a 180° servo using a 10K potentiometer. From this example it is only a short hop of the imagination to see how you can use a servo to represent almost any quantitative Arduino output. The following is a modified version of the Knob.INO sketch I have used for teaching about servometers – a fundamental concept of accessible hardware design.
<div class="code">
<pre>
/*
Controlling a servo position using a potentiometer (variable resistor)
by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
Modified by Josh Miele for the Blind Arduino Project, 05/11/2018
*/
#include <Servo.h> //tells the compiler to use functions contained in the servo library
Servo myservo; // create servo object to control a servo
int potPin = 0; // analog pin used to connect the potentiometer
int servoPin = 5; //Servo attached to digital pin 5
int val; // variable to read the value from the analog pin
void setup()
{
myservo.attach(servoPin); // attaches the servo on pin 5 to the servo object
} //end of setup
void loop()
{
val = analogRead(potPin); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 180); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val); // sets the servo position according to the scaled value
delay(15); // waits 15 milliseconds to stabilize the servo
} //end of main loop
</pre>
</div>
<p>In reality, many inexpensive 180° servos are a little unreliable at the extremes. It's generally best to limit your 180° servometer's range of motion to 160° (i.e. not using the 0-10° and 170-180° ends of the semicircle) as we have done in the sketch above. This can make placement of tactile markings something of a squeeze unless you have a rather long pointer attached to your servometer. For this reason it's often nice to have a gauge with more rotation than 180°. In fact, it's nice to be able to aim a pointer in any direction you want, giving you maximum flexibility with your servometer. Imagine, for example, trying to build a tactile digital compass.</p>
<h4>The Continuous Rotation ServoMeter</h4>
<p>Arduino communicates with continuous rotation 360 servos using the same servo object as the 180° servos. The Servo.write method accepts a value between 0 and 180, making it super easy to implement the 180° servometer. However, it is not so simple for 360° servos. Continuous rotation servos respond to the 0-180 input by rotating the servo shaft at a particular speed and direction with an input of 90 being no rotation, values slightly larger than 90 rotating the servo shaft slowly clockwise, and values slightly less than 90 rotating the shaft slowly counterclockwise. As values approach 0 or 180 the speed of rotation increases in a counterclockwise or clockwise direction respectively. This is cool, but it makes it pretty hard to rotate the shaft to a particular orientation and keep it there as is needed for a servometer. Luckily, you can buy a special 360° servo with a position feedback sensor built right into the unit. <a target="_blank" href="https://www.amazon.com/gp/product/B074XKBWJ5/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B074XKBWJ5&linkCode=as2&tag=blarbl08-20&linkId=bfa1e1a9052302d124e4a707145576d2">Parallax 900-00360 Feedback 360° High Speed Continuous Rotation</a><img src="//ir-na.amazon-adsystem.com/e/ir?t=blarbl08-20&l=am2&o=1&a=B074XKBWJ5" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</p>
<P>The product I have been experimenting with is the <a href=https://www.parallax.com/product/900-00360>Parallax Feedback 360° High Speed Servo</a>. It includes a Hall Effect sensor that provides reliable feedback regarding the orientation of the servo shaft. It requires a little knowledge of Arduino hardware interrupts and some mental-rotation gymnastics to implement something like the Knob sketch above, but it's not that complicated. The following short sections explain a little about how it works, but if you are impatient, feel free to skip it, download the knobFBS sketch, and start experimenting.</p>
<h5>Sensor Feedback</h5>
<p>The orientation of the servo shaft is measured not with a pot as is often done with 180° servos, but with a magnetic sensor that uses something called <a href="https://en.wikipedia.org/wiki/Hall_effect">the Hall Effect</a>. Feel free to study up on this cool electromagnetic phenomenon, but you don't need to understand how it works. What you do need to know is that, when the servo is hooked up to power and ground, the sensor sends almost a thousand pulses per second to the Arduino, and that the duration of each pulse is proportional to the angle of rotation. When the shaft is oriented to an arbitrary zero point, the pulses are at a minimum and are extremely short (about 24 microseconds). As the shaft rotates clockwise the duration of each pulse increases until the shaft has rotated almost all the way around to the starting point where the pulses will again become extremely short. Just before returning to zero, the pulses are much longer and are at a maximum (about 1076 microseconds). By measuring the duration of each pulse with the Arduino, and with knowledge of the exact durations of the shortest and longest possible pulses, we can calculate the current orientation of the shaft.
</p>
<P>Being able to measure the orientation of the shaft makes it possible to use the servo speed and direction control to automate the movement of the servo shaft to any desired position – exactly what we need for a servometer. It also provides the possibility of using the feedback servo not just to display data, but also as a knob that can be adjusted by the user and read by the Arduino – a nice option for interactive accessible data display and input.</p>
<h5>Measuring Minimum and Maximum Pulse duration</h5>
<p>The best way to measure short pulses with an Arduino is by using <a href="https://www.allaboutcircuits.com/technical-articles/using-interrupts-on-arduino/">external interrupts</a>. Please feel free to explore this fascinating topic on your own, but for this project you just need to know that it's possible to use interrupts to instantly trigger desired actions through activity on certain digital pins. These actions take place regardless of what the main loop is currently doing, so interrupts are really great for catching input events that might otherwise be missed by a slower loop routine.
</p>
<P>The following basicFBS.INO sketch allows you to measure the minimum and maximum pulse durations for your individual unit. It also provides a simple Sonification scheme for the servo's position sensor so you know it's working – as the servo turns clockwise the tone rises to about 1KHz and then jumps back down. Use a serial monitor and a screen reader to read the minimum and maximum pulse widths for use in the next section. I've tried to explain all the specific technical details in the code and comments, so take a careful read through this sketch to understand what's happening. </p>
<h5>basicFBS.INO</h5>
<div class="code">
<pre>
/*********
* This sketch shows the basics of how to read from a 360Deg servo with feedback.
* Apot controls the direction and speed of the servo and a speaker sonifies the servo position.
* The serial monitor is used to read exact max and min values for the feedback pulse duration.
* For use with the parallax feedback 360° high speed servo
* https://www.parallax.com/product/900-00360
* Feedback provided via Hall Effect sensor
* Duty cycle of sensor corresponds to position with a min of 2.9% frq approx 910 Hz
* (my unit min = 24 microS, max = 1076 microS)
*********
* Wiring:
* Servo has a ribbon of 3 conductors and a second single wire, all with female connectors.
* With the servo shaft pointing up and the wires coming straight from the unit toward you the ribbon connections
* from left to right are GROUND, POWER, AND CONTROL. The single conductor is the feedback SENSOR.
* Connect CONTROL to D9 and the SENSOR to D2, with GROUND and POWER connected to 0V and 5V respectively.
* Connect the arm of a 10K pot to A0 with one of the other two connections going to power and the other to ground.
* Connect one side of an 8W speaker to D5 and the other to GROUND.
* When you get tired of the sound you can disconnect one of the speaker connections.
*********
* Josh Miele for the Blind Arduino Project -- Sep-06-2018
*/////////
//variables for measuring pulse width from servo feedback sensor
//The width of the pulse corresponds to servo position
volatile int timeHigh = 0; //number of microS in the current cycle
volatile int prevTime = 0; //start time in microS (from reset) of the current high cycle
//specify I/O pins
const byte servoPin = 9; //must support PWM
const byte sensorPin = 2; //must support hardware interrupt
const byte potPin = 0; //analog pin for reading potentiometer
const byte speakerPin = 5; //must support PWM
//Other variables
//For measuring your feedback unit's particular min and max pulse widths
int minTime = 500; //a selection from the mid-range to be adjusted down as the servo turns
int maxTime = 500; //a selection from the mid-range to be adjusted up as the servo turns
//use the standard servo library
#include <Servo.h>
Servo myservo; // create servo object
void setup() {
myservo.attach(servoPin);
Serial.begin(9600);
// when sensor pin goes high, call the rising function
attachInterrupt(digitalPinToInterrupt(sensorPin), rising, RISING);
} //end of setup fn
void loop() {
//use a pot to control the servo speed and direction
//values received from the pot are between 0 and 1023
//values sent to the servo should be between 0 and 180
//map handles this conversion.
myservo.write( map(analogRead(potPin), 0, 1023, 0, 180) );
delay(5); //for stability
//sonify the servo feedback position
//expect values between 20 and not much more than 1000 from the specs
tone(speakerPin, timeHigh);
delay(5); //again for stability
//collect the min and max values for the pulse width of the feedback sensor
//This will help us convert sensor feedback to angle for later use
//Just let the servo spin for a while and the min and max will reach their extreme values after a few cycles
if (minTime > timeHigh) minTime = timeHigh;
if (maxTime < timeHigh) maxTime = timeHigh;
printMinMax(); //see serial output function below
} //end of main loop
void rising() { //Interrupt service routine
//Whenever the sensorPin goes high this routine is triggered
attachInterrupt(digitalPinToInterrupt(sensorPin), falling, FALLING); //reassign ISR to catch the other end of the pulse
prevTime = micros(); //What time is it? It's safe to use micros in ISR for short durations
} //end of rising fn
void falling() { //interrupt service routine
//during a pulse, this routine waits to be triggered by the drop in voltage
attachInterrupt(digitalPinToInterrupt(sensorPin), rising, RISING); //reset ISR to catch beginning of next pulse
timeHigh = micros()-prevTime; //This is how long the voltage was high in microS
} //end of falling fn
void printMinMax() {
//This routine prints the current min and max pulse width values on a single line
//Use Putty or some other terminal program to read it
Serial.println(""); //put the newline at the beginning of the process to stabilize braille display output
Serial.print(minTime);
Serial.print(' '); //this puts a space between the numeric values
Serial.print(maxTime);
}
</pre>
</div>
<h5>knobFBS.INO</h5>
<p>Now that you have measured the minimum and maximum pulse durations for your feedback servo, you can use the knobFBS.INO sketch below as a starting point for your own 360° servometer. Substitute your measured values for minTime and maxTime in the sketch and you should be up and running. As above, I tried to provide lots of explanatory comments in the sketch itself, so the best way to understand it is to read through it, download it, and play with it. </p>
<div class="code">
<pre>
/*********
* This sketch shows how to control the position of a 360Deg servo with feedback.
* A pot controls the position of the servo and a speaker sonifies the servo position.
* For use with the parallax feedback 360° high speed servo
* https://www.parallax.com/product/900-00360
* Feedback provided via Hall Effect sensor
* Duty cycle of sensor corresponds to position with a min of 2.9% frq approx 910 Hz
* (my unit min = 24 microS, max = 1076 microS)
*********
* Wiring:
* Servo has a ribbon of 3 conductors and a second single wire, all with female connectors.
* With the servo shaft pointing up and the wires coming straight from the unit toward you the ribbon connections
* from left to right are GROUND, POWER, AND CONTROL. The single conductor is the feedback SENSOR.
* Connect CONTROL to D9 and the SENSOR to D2, with GROUND and POWER connected to 0V and 5V respectively.
* Connect the arm of a 10K pot to A0 with one of the other two connections going to power and the other to ground.
* Connect one side of an 8W speaker to D5 and the other to GROUND.
* When you get tired of the sound you can disconnect one of the speaker connections.
*********
* Josh Miele for the Blind Arduino Project -- Sep-06-2018
*/////////
//variables for measuring pulse width from servo feedback sensor
volatile int timeHigh = 0;
volatile int prevTime = 0;
//specify I/O pins
const byte servoPin = 9;
const byte sensorPin = 2;
const byte potPin = 0;
const byte speakerPin = 5;
//Other variables
//use the basicSFB sketch to collect these values for your particular unit
float minTime = 24; //min pulse width in microS corresponding to angle of 0
float maxTime = 1076; //max pulse width in microS corresponding to 359.99 deg
#include <Servo.h>
Servo myservo; // create servo object
void setup() {
myservo.attach(servoPin);
Serial.begin(9600);
// when sensor pin goes high, call the rising function
attachInterrupt(digitalPinToInterrupt(sensorPin), rising, RISING);
} //end of setup fn
void loop() {
//use a pot to specify target angle
int potVal = analogRead(potPin); //expect values between 0 and 1023 from pot
//fbServoGo expects values between 0 and 360, so use map to get there from potVal
int targetAngle = map(potVal, 0, 1023, 0, 360);
fbServoGo(targetAngle); //see function below for setting the servo position
tone(speakerPin, time2deg(timeHigh)+360); //sonify the servo position over 1 octave
delay(5); //for stability
} //end of main loop
void rising() { //Interrupt service routine
attachInterrupt(digitalPinToInterrupt(sensorPin), falling, FALLING); //reassign ISR to catch the other end of the high time
prevTime = micros(); //What time is it? It's safe to use micros in ISR for short durations
} //end of rising fn
void falling() { //interrupt service routine
attachInterrupt(digitalPinToInterrupt(sensorPin), rising, RISING); //reset ISR to catch next voltage rise
timeHigh = micros()-prevTime; //This is how long the voltage was high
} //end of falling fn
int time2deg(int time) {
//convert pulse duration to servo angle in degrees
return ((time - minTime) / (maxTime - minTime)) * 360.99;
} //end of time2deg fn
void fbServoGo(int targetAngle) {
//Make the feedback servo point in a particular direction
//with the minimum of movement (don't go the long way around)
byte speed = 2; //larger values slow response and increase stability
int servoAngle; //just initializing it for later.
int currentAngle = time2deg(timeHigh); //gets servo position in degrees
//calculate the 360 deg difference between current and target angles.
int angleDifference = (targetAngle - currentAngle + 360) % 360;
//calculate the absolute (minimum) angle difference between current and target angles
int absAngleDifference = abs(360-angleDifference);
//Use 360 deg angle difference to decide which way to turn (CW or CCW)
//use absolute angle difference to adjust motor speed as you get closer to the target.
if (angleDifference <= 180) servoAngle = 90 - (absAngleDifference/speed);
else servoAngle = 90 + (absAngleDifference/speed);
myservo.write(constrain(servoAngle, 0, 180)); //use constrain to keep things reasonable...
}
</pre>
</div>
Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com2tag:blogger.com,1999:blog-498071590791194008.post-4741968919435557462017-08-25T16:22:00.000-07:002018-09-14T14:06:45.760-07:00Meet The Grove Shield<p>The Grove Shield is a particularly useful tool for blind or sighted beginners working with Arduino. It’s awesome for quick proof-of-concept projects, introductory Arduino workshops, and for anyone with impaired dexterity or fine motor control issues. The main benefit of the Grove Shield and its family of components is that it saves you from the hassle of wiring each component to ground, power, and its respective input or output pins, simplifying project construction significantly. It also ensures solid connections with snugly fitting plugs and sockets. Only one kind of cable is used for all components, and the plugs have a clear orientation that prevents you from plugging them in backwards.</p>
<p>The Grove Shield from Seeed Studios piggybacks on the Arduino Uno or similar controller’s and allows easy connection to a large number of sensors, actuators, and communication options. In addition to the standard headers, the Grove Shield includes 16 sockets, all of which use the same four-conductor ribbon cables to connect Grove components to analog, digital, I2C, and UART pins on the Arduino. Each socket includes connections to ground and power, so wiring up projects becomes extremely easy. The Grove Shield also includes a Voltage Switch to switch between 5V and 3.3V power, a reset button duplicating the one on the Arduino, and the standard set of 6 male ISP pins. Oh, yeah – it also includes an LED if you’re in to that sort of thing.</p>
<p>A very nice Grove starter kit can be ordered from Amazon <a target="_blank" href="https://www.amazon.com/gp/product/B00NCF251C/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00NCF251C&linkCode=as2&tag=blarbl08-20&linkId=4987f84e49103f63207812f42b5730da">Seeedstudio Grove for Arduino - Starter Kit V3</a><img src="//ir-na.amazon-adsystem.com/e/ir?t=blarbl08-20&l=am2&o=1&a=B00NCF251C" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> for about $45, although it does include a relatively expensive LCD component which blind makers won’t have much use for. Other than that, the starter kit is great and includes a nice variety of components. Additional components can be ordered from Amazon or from <a href="http://www.seeedstudio.com">Seeed Studios</a>. Note that the starter kit does not include an Arduino.</p>
<p>When you receive your Grove Shield the pins on the back of the board are embedded in a foam pad to protect them from being bent. While getting oriented to the shield we recommend leaving the board attached to the foam or seating the shield on an Arduino. The pins on the bottom of the shield are delicate, and whenever you connect or disconnect the shield from an Arduino you should always be careful to avoid bending pins.</p>
<h4>Orienting to the Grove Shield</h4>
<p>With the Grove shield and its foam pad on a table in front of you, rotate the board so the Voltage switch and reset buttons are at the top-left corner, and the standard headers run vertically along the left and right edges of the board. The 6 male ISP pins (looking something like a sideways braille cell) should be toward you in the middle of the bottom edge of the shield.</p>
<p>The Voltage Switch faces left at the top edge of the left side of the shield. When the switch is set toward you the shield is set to use 5V power supply. When the switch is set away from you the board receives 3.3V. We have found this switch to be a little delicate, so handle it with care. If it breaks, the board is broken. Just below the switch on the left edge of the board is the reset button (and the LED). Along the top edge of the shield are the 4 analog sockets. located between the two standard headers are 12 other sockets arranged in a 3X4 grid like a telephone keypad.</p>
<h5>Analog Sockets</h5>
<p>The analog sockets line the top edge of the shield. From left to right they are A0, A1, A2, and A3.</p>
<h5>I2C Sockets</h5>
<p>The I2C sockets are the left-most column of 4 in the array of 12 sockets. Using the telephone keypad analogy, the I2C sockets correspond to 1, 4, 7, and *.</p>
<h5>Digital and UART Sockets</h5>
<p>The digital sockets are the top-three sockets in the right-hand column of the main group of twelve, as well as the center column of 4 sockets. The UART socket which uses digital pins 0 and 1 is the bottom right socket in the group of twelve (the pound sign in our keypad analogy).</p>
<p>Moving up the column from the UART socket, the sockets are D2, D3, and D4. Starting with the bottom-center socket and moving up, sockets are D5, D6, D7, and D8.</p>
<h5>Primary and Secondary Connections</h5>
<p>Somewhat confusingly, each analog and digital socket actually connect to two different pins – a primary and a secondary. Most components only use one of these connections, but some use both. Above we have listed only the primary connections, but each socket also connects to the next pin as a secondary connection. In other words, the secondary connection for A0 is A1, the secondary connection for A1 is A2, and so on. The digital connections follow the same pattern, with the secondary connection for D2 being D3, etc. In general, you only need to worry about the primary connections.</p>
<h4>Orientation to Grove Sockets and Plugs</h4>
<p>All the Grove sockets have a basic rectangular profile ( approximately 1/2X1/4 inch), and they are all oriented on the board with the longer axis running from left to right. Each socket has a notch approximately ¼ inch wide cut in the center of the two longer sides. One side has a much deeper notch than the other, and we will call the side with the deeper notch the “front” of the socket. You may have already noticed that the analog sockets are rotated at 90 degrees to the other 12 sockets. In other words, analog sockets have their fronts facing up with plugs entering from the edge of the board, while the other twelve have their fronts facing you with plugs entering from above. Each Grove component also has the exact same socket with a front and back.</p>
<p>The ribbon cables that connect the Grove components to the shield have an identical plug at each end. Each plug has a flat side which goes toward the back of the socket, and a side with two long parallel ridges which goes toward the front of the socket. At the very end of each plug are four holes which connect with corresponding pins inside the sockets. These holes correspond to the four wires of the ribbon cable. When the cable is plugged in to a socket with the front of the socket facing you, the wires, from left to right are primary pin, secondary pin, power, and ground, and are colored yellow, white, red, and black respectively. This is extremely useful to know if you want to integrate Grove and non-Grove components.</p>Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com2tag:blogger.com,1999:blog-498071590791194008.post-1131530866500885552016-10-07T11:53:00.002-07:002016-10-07T11:53:14.464-07:00Bay Area Blind Arduino Monthly Meetup<p>The <a href="http://bit.ly/SKIBAP">Blind Arduino Project</a> is delighted to announce the kickoff of the Bay Area Blind Arduino Monthly Meetup -- BABAMM!! Beginning on October 8, 2016, Bay Area makers, both blind and sighted, will gather on the second Saturday of every month to construct, code, converse, and collaborate on Arduino and Arduino-ish projects. Bring your own or plan to join with others to teach and learn in a supportive and friendly environment focusing on empowering blind and visually-impaired people to make their own accessible stuff with Arduino.</p>
<p>If you are a blind maker working on a project, or if you are blind or sighted and have an interest in learning more about how blind and visually-impaired makers build stuff with Arduino, we invite you to bring your projects and your passion to BABAMM. We welcome beginners and masters alike, and are eager to learn and share our knowledge about all things Blind Arduino!</p>
<p>Meetups take place in the Innovation Lab at the <a href="http://www.lighthouse-sf.org">LightHouse in San Francisco</a> from 1:00 to 5:00 on the second Saturday of every month. Space is not unlimited, so it is really helpful to have an idea of how many people to expect. If you’re interested or think you might want to come, we would really appreciate it if you would
<a href="http://meetu.ps/c/2M8ZR/lxyP0/a">sign up for the Bay Area Blind Arduino Monthly Meetup group.</a> This makes it a lot easier for us to remind you when the meetups are happening, and to let you know about any special things that might be planned for future meetups.</p>
<p>Please join us for BABAMM! We look forward to crossing paths with many new and old friends as the Bay Area Blind Arduino Monthly Meetups continue to build momentum, community, and cool devices.</p>Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com3tag:blogger.com,1999:blog-498071590791194008.post-37727870163501024272016-08-23T17:10:00.001-07:002016-08-23T17:10:18.271-07:00Configuring The Arduino IDE with the Java Access Bridge<p>Elsewhere in this blog I have discussed the relative inaccessibility of the Arduino IDE -- the free integrated development environment downloadable from <a href="http://arduino.org">arduino.org</a>. Various rumors and suggestions have reached me about how it can be configured to work with the Java Access Bridge, but despite hours of effort I have never been able to do it myself.</p>
<p>Now, Ken Perry, blind maker, frequent advisor to the Blind Arduino Blog, and software engineer at the <a href="http://www.aph.org">American Printing House for the Blind</a>, has finally documented <a href="http://www.blindelectronics.com/2016/08/arduino-ide-setup-with-windows-screen_22.html">how to make the Arduino IDE work with a Windows screen reader</a>. It is one of the early posts in what is bound to be an awesome <a href="http://blindelectronics.com">blog on blind electronics</a>.</p>
<p>It's great that Ken has finally told us how to get the Arduino IDE to work with the JAB, but I will probably continue to <a href="http://bit.ly/blarblNpp">write code and upload from Notepad++</a> rather than use JAB with the IDE. This is mostly because I have concerns about the security of the Java Access Bridge, but I also feel like I have spent enough hours of my life fruitlessly wrestling with the JAB and don't feel like doing it any more. Maybe I'll try it some day when I'm feeling energized and long on patience.</p>
<p>For many people working in larger institutions such as schools or libraries, the JAB approach will also not be convenient because it requires extensive modification of environment variables and system-level files. Many system administrators will not like the configuration changes necessary to make the Java Access Bridge work with the Arduino IDE.</p>
<p>But the good news is that you can do it if you want, and Ken Perry is the hero of the day for finally telling us how. Thanks, Ken!</p>Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com4tag:blogger.com,1999:blog-498071590791194008.post-1020115974057499232016-07-03T00:40:00.001-07:002016-07-03T00:40:26.374-07:00How to Compile and Upload Arduino Sketches with Notepad++ -- Simple, Convenient, Accessible<h4>Introduction</h4>
<p>Blind people living in the real world are constantly working out hacks and alternatives to “normal” work flows that are inaccessible in whole or in part. Arduino software development is no exception, and many of the posts in this blog have been devoted to working around the sketchy (sic) accessibility of the Arduino IDE itself. For example, in an earlier post I describe (perhaps in more detail than strictly necessary) <a href="http://bit.ly/blarbl02">how to set up and configure the Arduino IDE from the Windows command line</a>. In another post, Chancey Fleet provided excellent step-by-step instructions for <a href="http://bit.ly/blarblvs">installing and using Visual Micro to compile and upload Arduino sketches directly from Visual Studio</a>. The current post offers the most convenient Arduino development tool chain I have yet found –editing, compiling, and uploading sketches directly from Notepad++.</p>
<p>Notepad++ (hereafter Npp) is my text editor of choice for almost any simple editing work including coding Arduino. It is used by many developers who don’t want the overhead of a giant IDE just to edit a bit of code. It’s free, open source, simple to install, and largely accessible with whatever screen reader you happen to prefer. It has features such as code completion, line numbers, support for different character encodings, and many others, yet it remains extremely compact and easy to use. Perhaps my favorite feature is that it doesn’t care what kind of line endings you use, CR/LF or just LF – it just does the right thing. This is really nice when using cross-platform source files such as Arduino sketches. If you don’t know what I’m talking about, just take my word for it: Notepad++ is extremely convenient and easy to use as a code editor.</p>
<p>Compiling and uploading Arduino sketches from the command line is great for those of us who are really old school and feel at home typing incredibly long text-based commands. For others though, those long commands are just opportunities for typos and inexplicable DOS error messages. Similarly, for hardcore hackers who have millions of lines of code under their belts, Visual Studio might be the best Arduino development environment you could want. Speaking for myself, however, Visual Studio makes me feel like the Sorcerer’s Apprentice with too many options, settings, and terms that I don’t quite understand, and an incredibly complex interface as reins to ultimate unwanted and undeserved power. In fact, I recently hit an accidental keystroke in VS and the entire thing stopped working. Of course, if I knew what I was doing in there then I’d be able to fix it, but I don’t have that kind of time and I don’t want that kind of power. I just want to write a little Arduino code!</p>
<p>In contrast, Npp is just my speed. It lets me do what I need to do without giving me a dangerous amount of rope. At the same time it has hidden depths which can be quite handy. You could say that I am definitely down with Npp… </p>
<p>But Npp is just an editor. It is not a compiler or an integrated development environment, so it can’t compile or upload your Arduino sketches. On the other hand, it can be configured to interact with other programs on your computer (such as the Arduino IDE) which can. This article explains how to set things up to let you edit an Arduino sketch with Notepad++, and then compile and upload that sketch with a single command without ever leaving Npp. The resulting Arduino compiler output and error messages are even displayed in a Notepad++ window for easy review. </p>
<p>The following sections offer two scripts that can be executed from inside Notepad++. The first allows you to set the Arduino COM port – convenient since this may change frequently with different boards and USB ports. The other compiles and uploads the Arduino sketch that is currently open in Notepad++.</p>
<h4>Setting It Up</h4>
<p>Step 1: <a href="https://www.arduino.cc/en/Main/Software">Download the latest Arduino IDE</a> and install it. If necessary, check out my <a href="http://bit.ly/blarbl02">instructions on installing and configuring the Arduino IDE from the command line</a>.</p>
<p>Step 2: <a href="https://notepad-plus-plus.org/download">Download the latest version of Notepad++ (Npp)</a> and install it. This process is easy and you should have no accessibility-related problems. Take note of the directory where you are installing it because you’ll need to find it later to install the Npp plugin.</p>
<p>Step 3: <a href="https://sourceforge.net/projects/Npp-plugins/files/NppExec/">Download NppExec</a> (a plugin for NPP) and install it. The installation process consists of unzipping the NppExec archive and copying the appropriate DLL into the plugins directory of the Npp installation directory. You are probably using the Unicode version of Npp, so copy the NppExec.dll file from the DLL_Unicode folder of the archive to the plugins directory of Npp and restart Npp to complete the installation. For example, my Npp plugins directory is
"C:\Program Files (x86)\Notepad++\plugins"</p>
<p>Step 4: Set up the following Arduino-related NppExec scripts in Npp. You can either copy and paste them from below or <a href="http://bit.ly/Nppscp01">download the NppExec scripts </a> in this convenient archive.</p>
<p>The easiest way to install these scripts is to copy and paste them individually into the Execute dialog in NPP. This dialog can be opened with a keyboard shortcut (F6 inside Npp), or through Npp’s menus (Plugins > NppExec > Execute…).</p>
<p>The Execute dialog has a multi-line edit field for pasting or typing the script itself, a Save button for naming and saving scripts, a combo box for recalling previously saved scripts, and an OK button to execute the selected script. All the controls in this dialog are accessible with NVDA or JAWS.</p>
<h5>The Arduino COM Port Script</h5>
<p>This script makes it easy to quickly update the Arduino IDE’s COM port. This is the port used to upload the sketch to the board. When you invoke this script from inside Npp, a dialog pops up asking for the Arduino’s COM port. Appropriate responses are like the parameters you would use on the command line when setting the com port (e.g., com3, com4, etc.).</p>
<p>To set up the port selection script, open the Execute dialog by pressing F6 or by selecting Execute from the NppExec sub-menu of the Plugins menu. Paste the following script into the edit field and press the Save button. In the Save dialog, type something like “ Arduino Port,” and press return. The port selection script will then be saved for future use using that name.</p>
<p>Before saving, be sure to edit this script to reflect the actual location of your Arduino installation. I have mine in the root directory for convenience – “c:\arduino”. </p>
<code><pre>
//This NppExec script sets the com port of your Arduino IDE
//By Josh Miele -- June 27, 2016
//The Blind Arduino Project
//http://blarbl.blogspot.com
set arduino_path = c:\arduino\arduino_debug //the path to your Arduino IDE.
//put up a dialog box requesting com port name
inputbox "Please enter the COM port of your Arduino (e.g., com5):" //gets com port value
//use result to set port value doesn't verify
cmd /c "$(arduino_path)" --port $(input)
npp_console 0 //hide the console
</pre></code>
<p>Note: This script does no checking to make sure that you have entered a valid COM port or string. If you make an error typing or enter an invalid com port, you will get no error message or other feedback to indicate your mistake. Take care!</p>
<h5>The Compile and Upload Script</h5>
<p>This script saves the currently open Arduino sketch, then calls the Arduino IDE with the command line parameters to compile and upload it. It then passes any output, including errors to a new Npp file so that you can easily see what happened.</p>
<p>To set up the compile/upload script, open the Execute dialog by pressing F6 or by selecting Execute from the NppExec sub-menu of the Plugins menu. Paste the following script into the edit field and press the Save button. In the Save dialog, type something like “ Arduino Upload,” and press return. The compile/upload script will then be saved for future use using that name.</p>
<p>Before saving, be sure to edit this script to reflect the actual location of your Arduino installation. I have mine in the root directory for convenience – “c:\arduino”. Also make sure that the Arduino_output.txt file is being created in a directory where you have write privileges and where it won’t cause any problems. I put mine in “c:\temp”. The first time the script runs it will ask for permission to create the output file. After that it will quietly overwrite the file with each new execution of the script.</p>
<code><pre>
//This NppExec script compiles and uploads the current Arduino sketch in Npp
//By Josh Miele -- June 27, 2016
//The Blind Arduino Project
//http://blarbl.blogspot.com
//Set where the output goes. Make sure you have write privileges
set arduino_output = "c:\temp\arduino messages.txt"
//Set location of Arduino executable.
set arduino_path = c:\arduino\arduino_debug
npp_save //save current file before uploading
//Compile and upload sketch in current Npp window and send stdOut and stdErr to arduino_output
cmd /c "$(arduino_path)" --upload $(full_current_path)>$(arduino_output) 2>&1
npp_console 0 //hide the console
//show the results of the compile/upload in Npp window
npp_open $(arduino_output)
</pre></code>
<p>Note: This script does not account for the fact that the Arduino IDE will move your sketch if it is not already inside a folder of the same name as the stem of the script. For example, if you are editing a file called MySketch.ino located in c:\temp, executing the above NppExec compile/upload script will compile and upload the sketch, but the Arduino Ide will create a directory called c:\temp\MySketch and move the file MySketch.ino inside it. Notepad++will be left with an open file that has been moved out from under it. This has the potential to lead to unexpected errors and problems, so I recommend making sure your sketches are contained within folders of the appropriate name as modeled in the Arduino examples directory.</p>
<h4>Using the Scripts</h4>
<p>To invoke these scripts from inside Npp, press F6 to bring up the Execute dialog, then use your arrow keys to select the desired script from the combo box and press return. Pressing ctrl-F6 will execute the last script without invoking the execute dialog.</p>
<p>Note: There is a way to map individual NppExec scripts to their own keyboard shortcuts using the Shortcut Mapper under the Settings menu. Unfortunately, this dialog is not accessible using NVDA or JAWS. I believe there is a way to modify the shortcut mappings by editing one of Npp’s XML files, but I don’t yet know how to do this. In the interest of getting this info into your hands, I decided to post this anyway and update the post when I find an accessible way to map the shortcuts. If you have info about how to do this, please leave it in the comments.</p>
<h4>References and Disclaimers</h4>
<p>I’m no expert in any of the several areas necessary for creating elegant and effective NppExec scripts. I encourage feedback in the comments and invite suggestions for improvement and additional helpful scripts.</p>
<p>In developing these scripts I found the following resources extremely informative:</p>
<ul>
<li><a href="http://docs.notepad-plus-plus.org/index.php/Compiling_Source_Code">The Notepad++ Wiki – Compiling Source Code</a></li>
<li><a href="https://technet.microsoft.com/en-us/library/bb490982.aspx">Using Command Redirection Operators</a></li><li><a href="http://daleswanson.blogspot.com/2012/07/how-to-compile-c-code-in-notepad-with.html">DALE SWANSON: How to compile C++ code in Notepad++ with gcc/g++</a></li>
</ul>
Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com66tag:blogger.com,1999:blog-498071590791194008.post-57724222020767604192016-06-20T14:44:00.003-07:002017-08-29T11:35:14.647-07:00Consider the Continuity Tester<p>It has been argued that the <em>continuity tester</em> is one of the most essential pieces of equipment for a blind electronics maker. It is a device which provides accessible feedback when current flows in a circuit -- basically an Ohmmeter or resistance meter. A continuity tester with audio or tactile output provides an accessible way of testing and even identifying components, leads, and connections, tracing paths on circuit boards, checking solder joints, and even making other simple measurement tools such as light detectors and thermometers. While the sighted person finds occasional uses for an Ohmmeter, the continuity tester is an indispensable and pervasive tool for the blind maker. I cannot over emphasize the importance of having one.</p>
<p>They come in a variety of flavors, from simple circuits which buzz below a specified resistance threshold to oscillators that vary the pitch of an audible tone depending on the amount of resistance in the circuit. The classic continuity tester described in the following section, as well as many other awesome accessible continuity tester circuits and their uses, are fully documented in the
<a href="http://www.ski.org/sktf-Fall-1982#tester">Fall, 1982 issue of the Smith-Kettlewell Technical File</a>. Advanced makers should definitely study these for insight into some old-school accessible test equipment.</p>
<h4>The Classic Continuity Tester</h4>
<p>The classic Smith-Kettlewell continuity tester is an elegantly simple circuit which makes for an excellent first soldering project (read the
<a href="http://www.ski.org/smith-kettlewell-technical-file-soldering-series">Soldering Series</a> in the Smith-Kettlewell Technical File for all the information you need on blind soldering techniques). If you're planning to build electronics, make stuff with Arduino, or otherwise make a habit of messing around with wires and components, I strongly recommend building one. It's reliable, versatile, and extremely nice to have around.</p>
<h5>Building the Classic Continuity Tester</h5>
<p>The continuity tester's oscillator consists of an audio output transformer and a PNP transistor. An 8 Ohm speaker is connected across the leads of the low-impedance secondary of the transformer. The primary of the transformer has a center tap which connects to the emitter of the transistor. One end of the transformer's primary connects to the Positive terminal of a 9-volt battery. The other primary lead connects through a 0.022 uF capacitor to the base of the transistor. Across the entire primary is another 0.022 uF capacitor. The base of the transistor connects through a 22K resistor to the positive test terminal. The negative test terminal connects to the collector of the transistor and the negative terminal of the battery (ground). That's it!</p>
<h4>A Simple Arduino-Based Continuity Tester</h4>
<p>While the continuity tester described above is extremely simple and reliable, you may not have these capacitors, transformers, or transistors readily at hand. Possibly you aren't yet confident enough with a soldering iron to build it. Sometimes you may want to slap a continuity tester together using an Arduino and a couple of resistors. The following sketch makes a reasonably handy audible continuity tester, although the classic continuity tester described above is superior in most ways.</p>
<h5>Building the Arduino Continuity Tester</h5>
<p>Connect a 1 mega Ohm resistor and a 1 kilo Ohm resistor to analog pin 0 of the Arduino board. Connect the other end of the 1 mega Ohm resistor to ground and the other end of the 1 kilo Ohm resistor to +5v. Connect a piezoelectric buzzer to digital pin 9 and ground, (or you can substitute a speaker in series with a 100 Ohm resistor). Connect the positive test lead to analog pin 0 and the negative test lead to ground.</p>
<h5>Programming the Arduino Continuity Tester</h5>
<p>Copy and paste the following sketch into your development environment, make any desired modifications, and upload it to your Arduino. You can also
<a href="http://bit.ly/blarct01">download the continuity tester sketch</a> here.</P>
<div>
<pre>
/*
Simple Audio Continuity Tester
Wiring Description
Parts:
Resistors -- 1Meg, 1K, 100 Ohm.
8 Ohm speaker or piezo buzzer
jumper cables and test leads
Arduino...
Connect buzzer to pin 9 and ground.
If using a speaker, connect one side to pin 9.
The other side of the speaker goes to 100 Ohm res, which goes to ground.
Connect 1K to +5V. The other end connects to a junction which includes the positive test lead, analog pin 0, and the 1M.
The other end of the 1M goes to ground.
The negative test lead also connects to ground.
When there is no connection between the test leads, the speaker is silent. It begins to click when there is some conductivity, and produces a 500 Hz tone when there is no resistance.
Play with resistor values and the mapping of reading to ici to optimize for the range of sensitivity you need.
By Josh Miele
The Blind Arduino Project, June 17, 2016.
http://bit.ly/blarct01
*/
int sensorPin = 0; //the pin connected to +test lead
int speakerPin = 9; //connected to speaker or buzzer
int thresh = 1000; //above this sensor val no sound is played
int reading = 0; //analog input value somewhere between 0 and 1023;
int ici = 0; //inter-click interval in ms. Shorter for lower resistance values.
void setup() {
pinMode(speakerPin, OUTPUT); //speaker (or buzzer) pin
pinMode(sensorPin, INPUT); //connected to +test lead
} //end of setup
void loop() {
reading = analogRead(sensorPin); //measure voltage across 1Meg Ohm
if (reading < thresh) {
//if reading is less than threshold then speaker clicks
//play a 500 Hz click 5 mS long
tone(speakerPin, 500, 5);
//scale reading val to delay value in mS
ici = map(reading, thresh, 0, 200, 0);
delay(ici); //wait before playing next click
} //end of if
} //end of loop
</pre>
</div>Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com1tag:blogger.com,1999:blog-498071590791194008.post-19014970321653246512016-05-30T14:18:00.001-07:002016-05-30T14:18:44.861-07:00HELP -- My Arduino Headers Don't Have Gaps!<p>In another post I wrote about <a href="http://bit.ly/BLARBL03">orienting yourself to the Arduino pins using tactile landmarks</a> such as the gaps in the left and right header blocks. Unfortunately, the header blocks on some Arduino boards are manufactured without gaps between sections. Instead, both right and left headers are continuous blocks that include both upper and lower sections. Where the gap would be on most boards is simply a double-wide space on the header with no hole at all.</p><br />
<p>You can orient yourself the hard way using a probe such as a jumper pin, wire, or stylus to feel your way along the top of the header to find the spot where there is a wider gap between holes. This is the break between the upper and lower sections. While this is doable, it’s definitely a pain to do every time you need to find a particular pin.</p><br />
<p>To make navigation easier on these notchless boards, use a serrated dinner knife or a metal nail file to cut a notch between upper and lower sections that is easily detectable by touch. Guide the knife or file by placing male jumper cables on either side of the gap, that is, in the bottom hole of the top section and the top hole of the bottom section. Placing the knife or file between the two jumpers, gently saw back and forth to cut a small notch in the plastic header. Be sure to hold the Arduino by the header, not the board, to avoid straining the joint between the header and the board. The notch doesn’t need to be deep in order to be easily felt. Five to ten strokes with the knife or file should be enough. Check to be sure you can feel it and continue if necessary.</p><br />
<p>If you don’t want to permanently mark your header you can use a probe to find the gap and place a temporary landmark such as a flexible plastic toothpick or male-female jumper cable in one of the adjacent holes. The main consideration here is not to use anything which might accidentally break off or create a short.</p>Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com0tag:blogger.com,1999:blog-498071590791194008.post-18696625940960849852016-05-25T17:07:00.000-07:002018-09-14T16:49:08.254-07:00What is the Blind Arduino Blog?There is nothing new about blind makers -- we have a long history of creativity and innovation in order to get access to the information we need to do the things we want to do. We also have a long history of sharing how-to information among ourselves in order to support our community in achieving our goals and potential. The Blind Arduino Blog follows in this proud tradition.<br />
<br />
<a href="http://hamgallery.com/Tribute/W2JIO/">Bob Gunderson's</a> Braille Technical Press was a great, mid-century example of blind people supporting other blind people in building the tools they need. It largely focused on amateur radio tools and techniques, but it was an early pioneer in the blind DIY electronics genre. Bob worked as an electronics teacher at the <a href="https://en.wikipedia.org/wiki/New_York_Institute_for_the_Blind">New York Institute for the Blind</a> and published the Braille Technical press in the 1950s as a way of documenting the accessible tools he and his students developed so that other blind hams could build and use them.<br />
<br />
More recently in the 1980s and 90s, Bill Gerrey at <a href="http://www.ski.org/">The Smith-Kettlewell Eye Research Institute</a> (where I happen to work) published the <a href="http://www.ski.org/smith-kettlewell-technical-file">Smith-Kettlewell Technical File</a> -- a publication inspired by Gunderson's earlier magazine. In addition to publishing instructions for building all kinds of useful accessible test equipment and refining the technique of circuit description, the Technical File published a series of excellent tutorial articles on techniques for blind solderers, also available at the previous link to the Technical File.<br />
<br />
With the advent of open-source, relatively standardized, microprocessor-based project kits like <a href="https://www.blogger.com/www.arduino.org">Arduino</a>, the kinds of devices that can be built by the casual maker at home have become quite sophisticated. In fact, Arduino is an ideal platform for creating a variety of accessibility devices which blind makers and users might find useful. For example Arduino would be perfect for building tools like audio and tactile meters and gauges which could be driven by any manner of sensors and detectors. From accessible scales to timers, range finders, multimeters and beyond, Arduino could make it relatively easy to design and share accessible tools which can be endlessly modified, adapted, and improved to meet a wide range of applications and needs.<br />
<br />
A little googling reveals that there are designs for a number of Arduino-based accessibility devices scattered across the net. However, none that we have found are intended to be built by blind people, Nor is the documentation necessarily accessible. Furthermore, the fact that they are from all over the place means that they are inconsistently documented and occasionally hard to find.<br />
<br />
The Blind Arduino Blog is another step along the road paved by Gunderson and Gerrey. Its intent is to provide a public clearing house for blind makers who want to build accessible devices with Arduino. The project has two main objectives:<br />
<br />
<ol><li>To provide clear instructions and accessible resources for blind people who want to develop for Arduino, and</li>
<li>To Assemble a library of accessible project descriptions for devices that might be of particular use for blind people.</li>
</ol><br />
<br />
Before we can begin assembling our library of accessible Arduino devices for blind makers, there are a number of hurdles to be overcome. We can build on Bill Gerrey and Bob Gunderson's hardware-assembly description techniques to document how to build the Arduino hardware, but the coding component needs some R&D. First we need to identify and document the accessible tools and resources for learning, writing, and uploading code to the Arduino itself.<br />
<br />
There are many different Arduino boards and accessories, and many different software tools available for coding, uploading, and debugging. Thus, the first posts to this blog will document our investigations into which boards, tutorials, and other tools are most accessible, as well as any work-arounds or tricks for getting the most out of them as a blind user. Once we have a nice foundation of accessible tools for Arduino development on which to build, we can move on to our long-range plan of collecting and developing accessible instructions for building a wide variety of accessibility devices based on Arduino. My own personal interest is in duplicating a number of devices from the S-K Technical File recast in Arduino. As our group learns and grows, I have confidence that the depth and diversity of projects will expand well beyond what I currently imagine.<br />
<br />
<h4>Some Comments on Platforms, Screen Readers, and Browsers</h4>Arduino software development can be done on Linux, Mac, Windows, and other platforms. This blog will focus on identifying tools that are Windows based. For folks who are comfortable in Linux, I suspect that is the easiest and most accessible path for Arduino development. However, most people are a little intimidated by Linux. While Apple has done great work with VoiceOver, the vast majority of blind users are still on Windows. For these reasons, we are committed to charting an accessible Arduino-development path through Windows. This doesn't mean that we won't include some posts on tools for other platforms, it just means that the emphasis here will be on tools for Windows.<br />
<br />
In addition, in making our judgements about accessibility of tools and informational resources, we will assume the default screen reader/browser combination of <a href="http://nvaccess.org/">NVDA</a> and <a href="https://www.mozilla.org/">Firefox</a>. Certainly there are other screen readers and browsers and preferences will vary, but web site performance will as well. Since we can't test all combinations, we will generally stick to NVDA and Firefox when we test Arduino resource sites for accessibility.Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com5San Francisco, CA, USA37.7749295 -122.4194155000000137.373501499999996 -123.06486250000002 38.1763575 -121.77396850000001tag:blogger.com,1999:blog-498071590791194008.post-29325684789391920702016-05-23T08:00:00.000-07:002016-06-22T13:39:18.146-07:00Visual Studio Community: a free, accessible IDE for Arduino<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Thanks to
Ken Perry for investigating and recommending Visual Studio Community 2015 as an
accessible Windows environment for programming Arduino. This method requires
some time and effort to set up, but once it’s done it offers screen-readable
line numbering, error reporting, serial monitoring and code completion, among
other advantages. I found that JAWS 17 and NVDA 2016.1 work equally well with
Visual Studio Community. If you’d like to give VSC a try, here’s how:</span></div>
<h4 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<span style="color: #666666; font-family: "Arial","sans-serif"; font-weight: normal;">Installation</span></h4>
<h5 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<b><span style="color: #666666; font-family: "Arial","sans-serif";">Arduino
IDE</span></b></h5>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">You’ll
still need to start out by downloading the </span><a href="http://www.arduino.org/software"><span style="color: #1155cc;">Arduino IDE</span></a><span style="color: black;">; you won’t be opening or coding in this IDE, but a Visual
Studio plug-in needs to use the Arduino compiler behind the scenes. If you
already have the IDE, check to make sure it’s the latest version; if it isn’t,
download the current version before moving on. (Note: at this writing, the
current version is 1.6.9. It’s of course possible that a future version will be
incompatible with VSC. A quick Google search of the current IDE version and VSC
version should let you know whether they’re working together). It’s a good idea
to put the Arduino folder at the root of your hard drive: by default it
installs within C:\Program Files, which can cause problems with permissions
down the line. If you already have the IDE installed, you can just copy the
whole Arduino folder from C:\Program Files to C:\.</span></div>
<h5 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<b><span style="color: #666666; font-family: "Arial","sans-serif";">Visual
Studio Community 2015</span></b></h5>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Visual
Studio Community is available as a </span><a href="https://www.visualstudio.com/post-download-vs?sku=community&clcid=0x409"><span style="color: #1155cc;">free download.</span></a><span style="color: black;"> While
the initial download is relatively small, budget some time (it took me around
45 minutes with a decent wifi connection) for the VSC installer to acquire and
configure additional files, and make sure you have 12 gb of free storage space
(8 for VSC, 4 for Visual C++) before you begin the setup process. The necessary
controls to move through installation are readable with both JAWS and NVDA. To
monitor the progress of installation, use the touch cursor (JAWS) or object
navigation (NVDA). You may notice some “phantom controls” above the progress
information that refer to ending a session, cancelling setup, and choosing an
installation location. Don’t worry about those; keep your attention on the
reassuring movement of the files being installed and the progress percentage.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Note:
Before you start the installation, read ahead to the section of Visual C++. If
you choose a custom install for VSC, you can skip an extra step later on:
however, I haven’t tested this myself so I’ll be describing the (probably
longer) path I took.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">When
setup is done, activate the “Launch” button. You’ll be prompted to sign in or
create an account to connect to developer services, but you can tab and choose
“Not Now, Maybe Later” if you’d rather not.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Next,
you’ll be prompted to choose your development settings (the default, “General”,
is fine) and a color theme. Tab and choose to “Start Visual Studio”, and go
make a cup of tea or something; it takes about two minutes for VSC to configure
itself.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">You are
now in a world of buttons leading to tutorials, news, videos and more. You can
tab through these if you’d like to explore them.</span></div>
<h5 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<b><span style="color: #666666; font-family: "Arial","sans-serif";">Visual C++</span></b></h5>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">You’ll
need to install Visual C++ before programming your Arduino. If you didn’t do
this when you first installed VSC, navigate to the File Menu>New>Project.
In the dialog box of extension providers that appears in focus, choose Visual
C++. Tab several times to a list of extensions and choose “Install Visual C++”.
This installation took me about 15 minutes and all screens were readable,
although I encountered “phantom messages” similar to the ones I described when
installing VSC.</span></div>
<h5 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<b><span style="color: #666666; font-family: "Arial","sans-serif";">The
Arduino Plug-in</span></b></h5>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Navigate
to Tools>Extensions and Updates to install the Arduino Plug-in, otherwise
known as “Visual Micro”.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Within
the Extensions and Updates dialog box, shift-tab once and change the combo box
from “Installed” to “All” (sorry, this box’s label seemed unreadable by NVDA).
Then, tab to the search box and type in “Arduino”. Tab to the table of
extensions, where “Arduino IDE for Visual Studio” should be your top hit. Tab
once more to Download, and press enter to initiate download and installation.
(You may need to say “Yes” to a User Account Control at this point”). One more
dialog box will appear; choose Install, and follow the prompt to restart VSC.
(If you receive an error message stating that “per user extensions” could not
be loaded, close VSC; set its properties to always run as an administrator; and
reopen it.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">When VSC
restarts, you’ll be placed in a dialog box to configure IDE locations. (You’ll
also be shown a window containing the Arduino for Visual Studio documentation).
Choose your Arduino IDE version and the installation path for your Arduino IDE,
then tab and choose OK. At this point, I was presented with a message reading
“toolchain reloaded” and the only way to dismiss it was to close and reopen
VSC.</span></div>
<h4 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<span style="color: #666666; font-family: "Arial","sans-serif"; font-weight: normal;">Getting ready to program</span></h4>
<h5 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<b><span style="color: #666666; font-family: "Arial","sans-serif";">Select
your toolbars</span></b></h5>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Navigate
to View>Toolbars and select all four Micro toolbars (Boards, Project,
Programmer, Serial Communications).</span></div>
<h5 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<b><span style="color: #666666; font-family: "Arial","sans-serif";">Configure
VSC to work with your board</span></b></h5>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Visual
Studio Community can work with a wide variety of microcontrollers, including
Arduino. You need to specify your board and how it’s connected before you can
write programs to your Arduino.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">Connect
your Arduino and find out what com port it’s using. To do this, open your
Device Manager and expand the “Ports, Com and LPT” section.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">In VSC,
navigate to the “Micro Boards” toolbar (you can do this by pressing Alt for the
menu bar and then pressing Control+Tab until you find the toolbar). The first
combo box you find, Micro Applications, will specify your IDE version. Tab once
to the Board combo box and choose your Arduino model. (Pro tip: the first
choice here is “Arduino Yún” which sounds a lot like, but emphatically is not,
the same thing as “Arduino Uno”. Do not waste time choosing this option and
failing to program your Uno: I’ve already done that for you).</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">After you
choose your board, navigate to the Micro Serial Communications toolbar and
choose your board’s com port.</span></div>
<h4 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<span style="color: #666666; font-family: "Arial","sans-serif"; font-weight: normal;">Writing a Program</span></h4>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">To create
your first project, navigate to File>New>Arduino Project. Give your
project a name and press enter. A blank sketch is always populated with lines
for “Void Setup” and “Voic Loop”, along with comments (bracketed by /* and */)
explaining what those sections mean. If you’re writing code by hand, leave
these in place; if you’re pasting in a code example that already has these
sections, select and delete the existing text before you paste.</span></div>
<h4 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<span style="color: #666666; font-family: "Arial","sans-serif"; font-weight: normal;">Uploading the Program</span></h4>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">To upload
your program, press Control+F5. If VSC finds errors, it will list them for you,
by line and column number. If not, it will let you know whether the program
finished uploading. In either case, to dismiss the message and get back to your
code, press Escape.</span></div>
<h4 style="margin-bottom: 4.0pt; margin-left: 0in; margin-right: 0in; margin-top: 14.0pt;">
<span style="color: #666666; font-family: "Arial","sans-serif"; font-weight: normal;">Closing and re-opening your program</span></h4>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="color: black;">VSC
refers to programs, which can include your Arduino sketch and any associated
files, as “Solutions”. Navigate to File>Close Solution when you’re done
working with a program, and follow the prompt to save or discard changes. To
open a program you’ve previously created, navigate to File>Open>Arduino
Project.</span></div>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>ZH-CN</w:LidThemeAsian>
<w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Arial;
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->Chancey Fleethttp://www.blogger.com/profile/12254960136251737326noreply@blogger.com5tag:blogger.com,1999:blog-498071590791194008.post-26815443538317598972016-05-07T00:00:00.000-07:002016-05-19T14:11:19.922-07:00Blind Arduino Booth at Maker Faire Bay Area 2016<a href="http://makerfaire.com/bay-area/">Maker Faire Bay Area</a> has been growing in size and coolness ever since it started a few short years ago. At this giant festival makers of all kinds get together to show off their stuff, swap ideas, and encourage each other to greater heights of collaborative creativity.<br />
<br />
This year the faire will be even cooler because the <a href="http://bit.ly/SKIBAP">Blind Arduino Project</A> will be running a booth – showing off awesome accessible gadgets, answering questions about how blind people build stuff with Arduino, demoing blind soldering techniques, and more. <br />
<br />
Look for us in Zone 2, booth 2420. We will be in among amny other Arduino-related booths, so please enjoy the process of finding us and telling them you're looking for the Blind Arduino Booth.<br />
<br />
Maker Faire 2016 takes place at the San Mateo Event Center, May 21-22, with a <br />
<a href="http://makerfaire.com/bay-area-2016/getting-to-maker-faire/">convenient shuttle connecting from Millbrae BART</a>.<br />
<br />
Please tell your friends about it and come visit our booth at Maker Faire Bay Area to learn all about blind makers and how blind people work with Arduino!<br />
<br />
If you are tweeting about your Maker Faire experience, please remember to use #BlindArduino and #mfba16 in your posts.<br />
<br />
Looking forward to seeing you there!<br />
Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com1tag:blogger.com,1999:blog-498071590791194008.post-8767645408383176692016-05-03T21:52:00.000-07:002016-06-28T12:47:24.842-07:00A (Very New) Beginner's Guide to Hobby Electronics and Robotics<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; tab-stops: list 0in; text-indent: -.25in;">
</div>
<ul>
<li><span style="text-indent: -0.25in;">absolutely no background in robotics,
electronics, or programming needed</span></li>
<li><span style="text-indent: -0.25in;">some assembly required</span></li>
<li><span style="text-indent: -0.25in;">use of eyes NOT required</span></li>
<li><span style="text-indent: -0.25in;">batteries not included </span></li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm2_X0GFnp6wvZoP3ucCShr1nDJrKCWip2H9tYhY0H3My4zVwVQ9f1wYuPFxHZzsZj9Y5-nGdApLXCdRsUElhV5jXv1oDC2bvgRVzYdjOCJV4JVFchp1lnIeSuQezRWrgxTBs4yIXGmAs/s1600/LMB.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Laura's robot: the Luna Moth Bot" border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm2_X0GFnp6wvZoP3ucCShr1nDJrKCWip2H9tYhY0H3My4zVwVQ9f1wYuPFxHZzsZj9Y5-nGdApLXCdRsUElhV5jXv1oDC2bvgRVzYdjOCJV4JVFchp1lnIeSuQezRWrgxTBs4yIXGmAs/s320/LMB.jpg" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small; text-align: start;">My first robot, the Luna Moth Bot, on exhibit at the Pittsburgh Mini Maker Faire 2011. The microcontroller, motor control circuit, breadboard, and tank treads are housed under a repurposed SMILA BAGGE plastic lamp enclosure from IKEA that is about 12 by 9 inches. The photoresistor sensors (more on those later) are sized to fit perfectly into the winged bug’s eye sockets. Note that my nail polish matches the robot enclosure. The neon light green color is similar to that of a luna moth, the inspiration for the project. Photo credit: </span><a href="http://www.larryrippel.com/" style="font-size: medium; text-align: start;" target="_blank">Larry Rippel</a></td></tr>
</tbody></table>
<h4>
Pfft... you think <i>I</i> could build a <i>robot</i>?</h4>
<div>
<div>
There is a certain mystique surrounding the word robot. For some it can conjure up delightful images of a friendly companion who is always eager to serve you; for others it causes fear of the unknown. When I think about robots, I think about machines that react to sensors. I tend to consider whether the functionality of a machine seems to be greater than the sum of all of its parts. Yes, that’s vague, but robotics is an incredibly diverse field and I couldn’t possibly hope to address it all. So, I’d like to focus on a very specific and accessible branch of robotics: hobby robotics. I’ll define a hobby robot as a robot built for fun or entertainment. It should mostly be an instructional device or something that you just think performs a cool function in some way.<br />
<br /></div>
<div>
Recent advances have made hobby robotics accessible to anyone with an interest, regardless of background or past experience. All you might need is a little bit of information about the hobby robotics community, a little background information that will make beginner guides more accessible, and a plan for moving forward. Though this guide is for anyone, I’ll be giving special attention to the readers interested in getting into electronics who are blind or have vision impairment by including comments on accessibility and links to other parts of this blog.<br />
<br />
<h4>
Getting started: a journey of a thousand miles begins with a single step</h4>
</div>
</div>
You might be considering whether you want to start out with a walking robot that will fetch you a can of pop from the fridge or perhaps instead a giant mechanical suit that will stomp around town and bring you to work while you sleep in. By the end of reading this guide, I hope that you can begin to get an appreciation for the complexity of such machines. The truth is that some of our world’s best and brightest are still working on just tiny facets of those kinds of ideas. Several companies might be sending out test fleets of self-driving cars, but machines still have a long way to go before they can perceive the world with the same level of ability as your pet cat. Robots built by professionals have many layers of complexity. Manufactures have cost and material concerns and all use kinds of technology that are advanced beyond the scope of this guide. I’ll just be talking about starting very small with a little programmable rover robot and focusing on having fun. An example of a rover robot is a small mobile robot like the one pictured above, the quintessential beginner's project.<br />
<br />
A fun place to begin outside of a school is in a makerspace, any one of the physical locations that comprise the “maker movement”. Makers (in this context) are folks who want to make the things around them better through modification and experimentation. A maker is the type of person who might build a robot or use a 3D printer, laser cutter, or even yarn to make an interesting item. A makerspace comes into existence when makers get together to create a community of collaboration, fun, and adventure. In a way, makers can be thought of as amateur hobbyist engineers, proving that you do not need a fancy degree to fulfill geeky aspirations. The community and resources of a makerspace should be available to anyone. In my experience in Pittsburgh and in traveling to other shops, I have always found them to be welcoming places. I was lucky enough to find some robotics experts to mentor me. Some people love to talk about their work and will tell you more than you ever wanted to know while others might direct you to someone else who could help you. You could really hit the jackpot and live in a town that has a makerspace specializing in robotics such as the Dallas Personal Robotics Group. Makerspaces can pool together at Maker Faires around the country to collaborate and show off new projects which the Blind Arduino group will be doing in 2016. Another nice thing about makerspaces is that if you do not have one in your town, you are free to start one yourself!<br />
<br />
If you prefer a more solitary learning path, or there are no resources for a makerspace in your hometown, there are some books and online resources that are available to help you. I have found a few problems with these materials that I hope to help you, as a (very) new beginner, overcome. First, since technology changes at a seemingly ever more rapid pace, printed material of any kind can become outdated or obsolete. Second, some “beginner's” books are still too advanced for someone who is brand new to electronics or robotics. I certainly remember feeling my eyes gloss over while trying to read some of these things. I am writing this guide as a possible solution to these issues. I will be discussing hobby robotics in very broad terms so that as the specifics change, the general principles will hopefully still be helpful to you. I will also discuss how to select resources for further learning and experimentation on your own. I encourage you to supplement all of this instruction with free resources, including your local public library or websites like www.instructables.com which offer free step-by-step outlines of projects. There are plenty of self-education podcasts and videos that are helpful once you know what you don’t know.<br />
<br />
Here are some rules about hobby robot building I learned from my mentor at the time, <a href="http://www.edparadis.com/" target="_blank">Ed Paradis</a>. He doesn’t take credit for them, so I guess that means their origins are now steeped in lore and mystery.<br />
1) Avoid building a robot you can’t outrun. (I always get a comical image in my head when I think about this one.)<br />
2) Avoid building a robot heavier than you can lift.<br />
3) Avoid building a robot that can’t fit in a car or out your main door.<br />
<br />
I’m adding a few rules myself:<br />
1) Don’t feel intimidated. It is unlikely that you will seriously injure yourself with a rover kit or unwittingly unleash a maniacal destruction bot upon the world. Everyone started somewhere and once knew nothing about robotics! With the creator’s permission, feel free to pick robots up and play with them to your heart’s content. <br />
2) Do whatever makes you excited. Hobby robotics is all about having fun. Leave behind whatever doesn't make you happy.<br />
3) Create a memorable robot. Give it a name or make it appeal to your senses. I personally like to make cute robots that evoke a smile instead of looking fearsome.<br />
<h4>
Robot parts!</h4>
<h5>
The Arduino (aka Braaaaaaaaaains)</h5>
<div>
<div>
Though hobby robotics has been a pastime for decades, I think that a specific technological invention has welcomed even the most beginning robot builder to the field, the Arduino microcontroller. With a little ingenuity and a few <a href="http://blarbl.blogspot.com/2016/01/arduino-o-pins-and-headers.html" target="_blank">tips from our blog</a>, it's accessible to people with disabilities, too. A microcontroller can be thought of as the brain of a robot. It makes judgments based on what you tell it to do and directs the rest of the robot part's based on conditions around it. Around 2005, a group of researchers put together a project that would allow novice electronics users to easily get started using computer code and a small device to control the world around them. The result was the Arduino, which has been improved upon several times since then. One aspect of the Arduino's appeal is that there is a huge community of people around the world using it and sharing their knowledge to help others get started. Arduino has become a bit of a common language, if you will, among beginning and advanced electronics users alike. Thanks to its open-source hardware design, there are tons of variants available as well. Here is just a sample of the <a href="http://playground.arduino.cc/Projects/Ideas" target="_blank">many projects that use Arduino</a>. </div>
<div>
<br /></div>
<div>
The Arduino itself is a small board of electronics with a processor like the one in your computer except that its processor is slower and smaller. It comes with some software that allows you to write programs to run on it and this article discusses <a href="http://blarbl.blogspot.com/2016/05/arduino-software-accessibility-overview.html" target="_blank">ways to make the software accessible</a>. On one end, you connect the board to your computer using a USB cable and on the computer end, you can send the board "sketch" - a script that gets transferred to the Arduino via that cable. The script that will be running on the Arduino starts as an idea in your head, then as a text outline of your program, then a script written with help from the Arduino programming guides. At that point, you press a button to compile that script, that is, turn your human-readable script into a machine-readable file. (Beginning programmers might argue against the script being “human readable” but I assure you that it gets more and more so with practice.) This machine-readable file is sent via serial communication to your Arduino where it is stored. If you disconnect your cable, your program will still run because it is saved in the Arduino’s memory. You can only store one program at a time on the Arduino. If you want to change what the Arduino does, you just write a new script and overwrite the one you had on there before. If you want to add some new functionality, you can purchase some additional hardware that sits on top of the Arduino called a shield. There are many shield designs available for sale online for different purposes. Because the Arduino is “embedded” in the robot, this type of programming is called embedded programming. Something I just love about this kind of programming is knowing that an idea I had in my head is now actually running a robot even if I am not physically present. </div>
<div>
<br /></div>
<div>
While I am talking about programming the Arduino, I’d like to add more information on learning to program for the first time. When working with an Arduino, a script is called a “sketch”. There are more details in the <a href="http://arduino.cc/en/Guide/HomePage">Getting Started Guide on the Arduino</a> website. There is also a ton of great advice on the <a href="http://www.ladyada.net/learn/arduino/">AdaFruit </a>website. In general, it is a good idea to start with a plan and break it into small steps. Execute each small step, testing as you go, and you will have built your first program. Be sure to add lots of comments to your sketch. Comments are notes that you add to a program that are ignored when your sketch is compiled. I recommend using these comments to first create an outline and then fill in each section little by little. </div>
<div>
<br /></div>
<div>
As for the Arduino board itself, you connect to it via wires going to and coming from the other parts of the robot. The main thing that I’d like to encourage you to remember is that the Arduino is concerned with changes in voltages. Voltage is a somewhat abstract concept that has to do with the way that electric circuits work. A change in voltage can occur by changing the amount of electric current flowing through a circuit or the resistance of the components in that circuit. I don’t care to go into the details of these concepts, so I’m trying to be as general about this as possible. I only mention them because it shows that looking for changes in voltages in a circuit is a good way to tell that something somewhere else in that circuit has changed. You can learn more about these terms by studying Ohm’s law in physics or by picking it up as you go along while you build a robot. The bottom line is that your Arduino uses voltages to communicate your commands to your motors or read in information from your sensors. This is opposed to actually running the motors (usually) or making the sensors sense things. Other parts of the robot are responsible for those tasks. </div>
</div>
<h5>
The Sensors: sensitive kind of guys </h5>
<div>
If the Arduino is the robot’s command center, the sensors are its spies. The sensors collect information about the world and report it back to headquarters. There are a variety of low-cost sensors available that can give your robot some cool features. For example, potentiometers are sensors that have a little dial on top that can be turned to cause different effects within the circuit. Photoresistors or photodiodes can detect light. Infrared (IR) or sonar sensors can detect whether other objects are near or far from the robot. These sensors will probably be pretty small on a hobby robot. You can come up with clever applications such as using a pair of sensors and comparing their readings to guide the robot’s navigation. For example, if you have two light sensors, you could have your robot steer towards whichever one has more light shining on it, which is what my robot did. Sonar or IR sensors can be placed on the bottom of your robot as a means of detecting the edge of the table. You can tell the robot to stop whenever it senses that an object suddenly gets much further away. That is, you would watch for when the sensor goes from reading the table top close by to the floor far away. Here is more information about an <a href="https://www.baldengineer.com/alternatives-to-arduinos-serial-monitor.html" target="_blank">accessible way of reading those numbers</a>. There are sensors that can track just about anything about their place in the physical world, including the speed of travel, movement in any direction, or if they have twisted or turned in any dimension. The possibilities are almost limitless so it is a good idea to start out with just a few sensors of one type and expand from there. Note that when you are comparing the readings of two sensors, each sensor might report slightly different numbers from the others. You will need to calibrate these sensors, that is, make adjustments to your hardware or software to compensate for these differences. You can learn more about accommodating these sensors in the Arduino guides or as a part of building your first robot. </div>
<h5>
Power! Muhahaha!!</h5>
You will want some batteries to run your robot because a roving robot that is plugged into the wall might end up being no fun. The power requirements for your robot depend on things like your motor sizes, required running time before it dies, and the amount of cool things you want to hook up. Given all that variability, I wouldn’t be able to cover all cases in this guide so I will refer you to a kit, or to someone who will design your first robot for you. The main thing to know is that you should only use a battery of the specified size and type. This should be marked on the battery itself. Know that a fresh battery right out of the box or charger will cause different behavior than one that has been used a lot. If your robot is acting strangely, try swapping in new batteries. Also, if you are just using something like a few AA batteries, you don’t have to worry too much about electric shocks. Hobby robotics is not an extreme sport.<br />
<h5>
Motors and gears: he's going the distance, he's going for speed </h5>
I once used the terms “engine” and “motor” interchangeably which left an inquisitive engineer aghast that there was an “engine” (thinking of an engine in a car) in a tiny vehicle (that most certainly did not run on gasoline!). I now know that there is actually some debate regarding the exact meaning of those two terms depending on historical context and other factors and that other people use them interchangeably, too. The fact of the matter is that if you want to get into robotics, you will encounter a confusing array of technical terms and you will definitely make some mistakes in using them along the way. Don’t let that deter you. While you may encounter that one person eager to put you down, my experience has shown that there will be far more people even more eager to help you along. In my case, the engine/motor confusion just led to a good laugh for all. I’m just going to call them motors for the rest of this guide. That’s how I refer to them in the context of hobby robotics in conversation now. I am clearly not an expert on motors, so I will tell you what I’ve learned about some very specific yet common motors, hobby DC motors, and how to avoid destroying them. The most basic thing to know is that when it comes to working with motors, it is important to know what the motor needs to run and what kind of result you should expect from running it. I know that I needed my Arduino to tell the motors when to run, and I’ll go into that more in the next section on motor controllers. I also needed those motors to turn my robot’s wheels. Specifically, I had model tank treads that just had a sprocket, or a wheel with teeth, that was responsible for turning the entire tread. I had a total of two motors, one for each sprocket/tread combination on either side of the robot. (I spent most of my life thinking that the term ‘sprocket’ was a made up term for the Jetsons and wasn’t a real thing. You never know what you’ll learn when you try new things!)<br />
<br />
In the case of my robot, I had motors that had a metal shaft sticking out of one end with a little gear attached to it that would spin when the motor had electricity flowing through it. That small gear was connected to other gears in such a way that I could take advantage of what are called gear ratios. You can read more about <a href="http://en.wikipedia.org/wiki/Gear_ratio" target="_blank">gear ratios</a> online and see lots of interesting physics discussions. I’ll summarize the basics. A gear ratio is determined by comparing the size or number of teeth of one gear to another. A smaller gear can make its rotation faster while a larger gear is capable of outputting more turning force, or torque. Torque has an interesting unit of measure because it is a combination of a force (or mass) unit and a distance unit. Something that took me a while to figure out is that torque isn’t just a force, or a distance between the center of a gear and its teeth, it is the combination of both of those things together. It is a little like velocity or speed. Velocity isn’t just the time it takes to travel a distance, and it isn’t just that distance that is traveled, it is both the time and the distance together in one measurement. I recommend that you start out working with gears that are selected for you and then experiment to see which sizes yield different results. This is another area where you can just keep going deeper and deeper with the details so start at the most general case and keep studying if you are interested. You can’t learn everything in robotics! That is an impossible task for one human. The specific problem that was solved by my gears was that I had a small motor that was capable of spinning that small gear really fast but was a weakling when it came to spinning around something heavy. The sprockets didn’t need to go as fast as the motor but they needed to turn with more torque than the motor alone could deliver. By putting gears between them and taking advantage of the increasing size of each gear compared to the rest of the gears in the gear train, the fast turning motor’s movement could be translated into the turning force I needed to turn the tank treads.<br />
<h5>
<br /> Motor Controllers: Control freaks</h5>
So you’ve got a motor, some gears, and some sweet wheels and you are ready to use them. Congratulations, you now have a toy car that will drive in one direction at one speed until you disconnect the power! If you want some control over your motor, you need something called a motor controller, oddly enough. Some people call them motor drivers or point out that they are just an example of a larger concept that is called a control system. If you buy one off the shelf, you would just hook it up to one of the pins of your Arduino on one end and your motors on the other according to its specifications. My first robot didn’t use an off the shelf motor controller and instead used a bunch of individual electronics parts put into what is called a breadboard, or electronics prototyping board. While this was a learning experience, I also nearly destroyed my whole robot because I accidentally hooked it up incorrectly the first time. I lucked out there, but if I didn’t, I could have just replaced some of the robot parts because they were pretty cheap. Use whichever motor controller is recommended to you or is a part of a kit you have purchased.<br />
<br />
<h5>
Chassis: bringing everything together</h5>
This section is about the exterior shell of your robot. You could say that it provides protection and structure for your robot, and I would agree, but I’d also consider it a place to stuff your somewhat ugly parts or hastily made assembly mistakes so that you don’t need to see them anymore. If you want a rover type robot, you would look for a chassis that can accept your wheels and has enough room to hold a microcontroller, some motors, some batteries, and some sensors. You may need to add some holes in which to situate sensors or to allow heat to escape so you might want to choose a somewhat easy to cut material. You can find many designs online that are inexpensive because they are composed of parts that come in a kit that you can assemble. These kinds of kits are commonly made out of wood or plastic and they were likely made using a tool called a laser cutter that can cut plastic and other materials on demand. A laser cutter allows for rapid prototyping and creation of a design. Really, though, you could put just about anything together as long as you think it looks cool. The chassis for my first robot was an old Ikea lamp I found at a thrift store. I took out the light bulb and cord and put in the electronics and wheels. There are even electronics that can be sewn into soft items like a stuffed animal but I’d be likely to recommend against that because it might just turn out to be creepy. Let’s delight, not traumatize, the children.<br />
<h4>
Time to build: the whole kit and caboodle </h4>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The best kit is a bunch of parts selected for you and handed to you by someone who can help you assemble them. Eventually, you’d learn enough that you could start making your own kits. Not everyone can get that, though, so you can consider many options available online. Look for something that accepts a common microcontroller like an Arduino and contains parts for everything I’ve described here. A good beginning kit should allow you options to customize it and make it do a variety of things as opposed to just one purpose. It’s a good thing if you should have to assemble it somewhat. I’m partial to this <a href="http://www.robotshop.com/en/dfrobotshop-rover-tracked-robot-basic-kit.html" target="_blank">kit from DFRobotShop</a> because it contains a lot of the features I like in a robot including a built-in motor controller, plenty of documentation, and a price under $90 as of this writing. As time goes by, these kits will be replaced by newer and cooler things. Embrace the change, just get started with something, join the community, and have fun!<br />
<br />
____<br />
<br />
Special thanks to <a href="https://wheresyourdog.wordpress.com/">Meagan H. Houle</a> for her copyediting services and to countless friends for playing with robots with me. </div>
<span style="font-family: "times new roman" , serif; font-size: 12.0pt;"><br /></span>
<br />
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<o:p></o:p></div>
Laura J. McCarthy Eberlyhttp://www.blogger.com/profile/06968782873198921421noreply@blogger.com18tag:blogger.com,1999:blog-498071590791194008.post-63592427315383133152016-05-03T19:52:00.000-07:002016-05-07T19:54:19.440-07:00Arduino software accessibility overview by OSThe Arduino software is used to write a "sketch" - basically a script - compile it, and send it to your Arduino board. It is also used to receive data from the Arduino board in the form of the Serial Monitor. Here is a <a href="https://www.arduino.cc/en/Main/Software" target="_blank">download link for the software</a> and an overview of making it accessible.<br />
<h2>
Software Setup</h2>
<h3>
If you are using a screen magnifier:</h3>
No adjustments needed. You may like the <a href="http://blarbl.blogspot.com/2016/01/arduino-o-pins-and-headers.html" target="_blank">Arduino O&M post</a> for more details on the smaller parts of the board.<br />
<h3>
If you are using a screen reader:</h3>
<div>
<ul>
<li>If you are using OS X, VoiceOver has been reported to work with the Arduino Integrated Development Environment (IDE) without modification. </li>
<li>If you are using Windows, see this post about <a href="http://blarbl.blogspot.com/2016/01/arduino-setup-and-accessibility-tips.html" target="_blank">setting up the software on Windows</a>. </li>
<li>If you are using Linux, the Windows setup post may be helpful but we do not have further details at this time. </li>
</ul>
</div>
<h2>
Learn to code resources</h2>
<div>
<ul>
<li><a href="http://arduino.cc/en/Guide/HomePage" target="_blank">Official Arduino Guide</a></li>
<li><a href="http://www.ladyada.net/learn/arduino/" target="_blank">Lady Ada Guide</a></li>
</ul>
</div>
<br />Laura J. McCarthy Eberlyhttp://www.blogger.com/profile/06968782873198921421noreply@blogger.com0tag:blogger.com,1999:blog-498071590791194008.post-52429485458544362742016-03-30T20:21:00.000-07:002016-05-31T15:13:58.843-07:00Getting to know the Arduino Uno Board<h2>
Getting to know the Arduino Uno Board</h2>
<br>
In <a href="http://blarbl.blogspot.com/2016/01/arduino-o-pins-and-headers.html" target="_blank">a previous post</a>, Josh thoroughly described the useful and interactive pieces of the Arduino Uno board. This article intends to describe physical components on the board that are not the pins and headers, in order to give new users a "tour" of the Arduino. Many of my explanations will describe components in relation to the locations of other parts. For our purposes, we will orient the Arduino Uno with its power and USB ports on the top and the components out in front of us. And generally, we will travel counter clockwise around the board. First up, the AT328Mega Microcontroller.<br>
<br>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;" id="id_fdf6_33ef_5b37_fbf6"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-0Rhz4A4BkGf1kb_S7hUnHCLJyuWot9zlgQXXh8KPxaUWYkcMaalclz-NH1CAuRRVXGBfNxRq7ENSE4XLL2AWeZKX7_8E9Boyp-HIHS6-YpvCGTWNS5mrkVB6CMMwjKkaLRldI7GhgeY/s1600/47185-arduino.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Picture of the Arduino Uno - courtesy of Tested.com" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-0Rhz4A4BkGf1kb_S7hUnHCLJyuWot9zlgQXXh8KPxaUWYkcMaalclz-NH1CAuRRVXGBfNxRq7ENSE4XLL2AWeZKX7_8E9Boyp-HIHS6-YpvCGTWNS5mrkVB6CMMwjKkaLRldI7GhgeY/s320/47185-arduino.jpg" title="" width="220" id="id_744d_5ace_719f_c96d" style="width: 220px; height: auto;"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Picture of the Arduino Uno, oriented with the USB and Power ports on the top</td></tr>
</tbody></table>
<h3>
<u>
AT328</u></h3>
The physically largest component on the Uno board is the AT328Mega Microcontroller, which is laid out in a vertical column just to the right of the analog pins, extending from the bottom portion to about two-thirds of the way up the board. This microcontroller is the essentially the "brains" of the Arduino, it is a computer chip that contains the CPU, a small amount of memory, and inputs/output capabilities that are realized by Arduino's analog and digital pins. More information about microcontrollers in general (what they do and how they work) can be found all over the internet, though I quite like Instructables.com's overview which can be found <a href="http://www.instructables.com/id/How-to-choose-a-MicroController/" target="_blank">here</a>.<br>
<br>
<h3>
The ICSPs</h3>
Directly to the right of the AT328, at the very bottom of the board, there is a little 3x2 grid of pins (sort of resembling a bed of needles, or a Braille cel) that poke straight up. <span style="background-color: white; font-family: "times" , "times new roman" , serif; line-height: 20px;">The ICSP is used to install a bootloader on your Arduino if it is no longer functioning. </span>As beginners, we won't interact with ICSP but it is a good landmark to orient yourself to the board. More info about Arduino Bootloaders is <a href="https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/connecting-the-programmer" target="_blank">here</a>.<br>
<br>
Moving to the right around the perimeter of the board, you will next encounter the digital pins, which are in a column formation along the right edge. Again, Josh explained these in great detail <a href="http://blarbl.blogspot.com/2016/01/arduino-o-pins-and-headers.html" target="_blank">here</a>. Just to the left of the very top two digital pins is a second ICSP (3x2 grid of pins), oriented perpendicular to the ICSP on the bottom of the board.<br>
<h3>
Restart Button</h3>
In the top right corner of the board adjacent to the USB port and above the digital pins is the restart button, which can be used if your Arduino is behaving erratically, or if you want to restart the program running on the board. Note that it's the only pushable button on the board (it's kind of fun, go ahead and press it).<br>
<br>
<h3>
USB port and AT16megaU2</h3>
The USB port is located above the second ICSP and slightly to the left. The Uno takes a standard USB type B cable input, and allows the board to both send / receive information and power from a computer. Just below the USB port is a small square-shaped chip, which is the second microcontroller, the AT16megaU2, which is the "brains" of the Uno's ability to communicated with the computer via USB. That second ICSP is tied to this second microcontroller.<br>
<br>
<h3>
16mhz crystal</h3>
<div>
Just to the left of the small square shaped AT16mega chip is an elongated oval-shaped cylinder. This is the 16 mhz crystal, which provides a clock input to the microprocessor. Continue to make your way towards the top left corner of the board.</div>
<h3>
</h3>
<div>
<h3>
Power Supply</h3>
<div>
In the top left corner of the Arduino Uno board are all of the components that pertain to power. If you leave your computer connected to the Arduino when using it, this area is of little concern. But if you plan on loading a program onto the Arduino and using the board independently from a computer, you will need to find a way to run power into the device. The power input jack, located in the very top left corner of the board, is a 2.1 mm x 5.5 mm jack than can receive between 7 and 12 VDC. Just to the left of the Power input jack is the voltage regulator, a small rectangular-shaped chip.</div>
<div>
<br></div>
<div>
Directly below the power jack are two cylindrical capacitors. These capacitors are located between the AT328Mega and the analog pins. We have completed our journey, having traveled counter-clockwise around the entire Arduino Uno Board.</div>
<div>
<br></div>
<h3>
LED Lights</h3>
<div>
Lastly, it is important to note that there are several LED lights on the Arduino Uno which serve a few different purposes. Diagonally to the right above the AT328 Mega's ICSP is the ON LED light, which lights up green when the unit receives power. Another LED can be found directly to the left of the Digital 13 pin, which is used in the <a href="https://www.arduino.cc/en/Tutorial/Blink" target="_blank">Arduino Blink</a> exercise.</div>
<div>
<br></div>
<div>
Thank you for reading and if you have any questions or clarification points, please share them in the comments below.</div>
<div>
<br></div>
<div>
<br></div>
</div>
<br>Benjamin Einsteinhttp://www.blogger.com/profile/07439356598308870748noreply@blogger.com2tag:blogger.com,1999:blog-498071590791194008.post-91290464440657331102016-02-16T01:54:00.000-08:002016-03-23T10:39:04.848-07:00Blind Arduino Workshop to Honor Arduino Day 2016In honor of <br />
<a href="https://day.arduino.cc" target="Blank">Arduino Day 2016</a>,<br />
on April 2, 2016, the Blind Arduino Project will hold the first of a series of in-person workshops to demonstrate and teach critical methods for blind Arduino developers. This workshop will include hands-on experience with eyes-free wiring, coding, and debugging of Arduino projects. We will assist blind makers with the process of configuring their own systems for accessible development, and will support attendees at all levels from design advice on advanced projects to one-on-one guided tours of open-source examples, all in a relaxed and supportive environment.<br />
<br />
Participants in this first Blind Arduino Workshop will gain first-hand experience building auditory and tactile displays for Arduino devices using a variety of servos, steppers, buzzers, and specialized shields. They will also form the core group of future teachers and mentors for our up-coming Blind Arduino Workshops -- yet to be announced.<br />
<br />
The first Blind Arduino Workshop will take place from 10:00-5:00 on April 2, 2016, at the Ed Roberts Campus in Berkeley, California. If you would like to attend this event, please <br />
<a href="http://bit.ly/blarwosi">sign up</a>.<br />
No previous experience is required, but knowledge of Windows and your access technology is suggested. Space is limited, so we may not be able to accommodate all applicants in the first round (hence the plan for more workshops in the future).<br />
<br />
To keep track of these events as they form and unfold, check in on <br />
<a href="https://twitter.com/hashtag/blindarduino" target="blank">#BlindArduino</a><br />
and<br />
<a href="https://twitter.com/hashtag/arduinod16" target="Blank">#ArduinoD16</a>.<br />
<br />
If you have questions about the event or want more information about the Blind Arduino Project, <br />
<a href="mailto:jam@ski.org?subject=Blind Arduino Question">contact the organizer by e-mail</a>.<br />
<br />
We hope to see you there!Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com0tag:blogger.com,1999:blog-498071590791194008.post-38609012891900474322016-01-03T22:59:00.005-08:002016-05-30T14:41:21.115-07:00Arduino O&M: Pins and HeadersThis article verbally describes the most current Arduino headers and pin locations (version R3) so you can start building things as quickly as possible. It offers a basic orientation to the Arduino board plus specific descriptions of pin locations on the standard headers used for input, output, and control. It also includes descriptions of some non-visual techniques for finding header sockets -- some manual dexterity and sensitivity required.<br />
<br />
This article does not orient you to older board configurations or to other components on the board, nor does it go into any detail about specific properties of the pins themselves. That information is readily available elsewhere, but a good start is <a href="https://www.arduino.cc/en/Reference/Board">this article with more information about Arduino pins and their properties</a>.<br />
<br />
<h4>Basic Orientation</h4><br />
Most Arduino boards are the same shape and size for standardization and interchangeability: a small rectangle about 2.25X2.75 Inches with USB and power ports on one of the short edges, and two rows of header sockets along the two long edges. The headers are narrow, tall blocks, each with a single row of small holes (sockets) along the center of the top face. Each Arduino pin is associated with one of these sockets.<br />
<br />
Holding the board with the end that includes the USB and power ports at the top, the headers run vertically along the left and right edges. Both left and right headers are divided into lower and upper sections separated by a small notch. Unfortunately, some headers are manufactured without this notch, making tactile orientation a little harder.Check out this post on <a href="http://bit.ly/blarblgh">dealing with notchless headers</a> for suggestions. In the modern R3 header configuration, the left header has 6 sockets in the lower section and 8 in the upper. The right header has 8 sockets in the lower section and 10 in the upper.<br />
<br />
Note: Older boards have header configurations with fewer sockets in the top sections on both left and right.<br />
<br />
The lower-left section of 6 sockets is the Analog Section. In order from bottom to top, the sockets are:<br />
A5, A4, A3, A2, A1, and A0. <br />
<br />
The top-left section of 8 sockets is mostly related to power supply. From bottom to top, these sockets are:<br />
voltage in, ground pin, another ground pin, 5 volt pin, 3 volt pin, reset pin, I/O reference pin, and an unused pin.<br />
<br />
The lower-right header section of 8 sockets is where the digital pins begin. From bottom to top, these are:<br />
D0, D1, D2, D3, D4, D5, D6, and D7. <br />
<br />
The top-right header section of 10 sockets continues the digital pins. From bottom to top, the sockets are:<br />
D8, D9, D10, D11, D12, D13, ground pin, analog ref pin, I2C SDA, and I2C SCL. <br />
<br />
<h4>Non-Visual Techniques for Navigating The Sea of Holes</h4><br />
It’s not easy to feel the sockets in the headers with your fingertips, but there are other ways. Counting the sockets is easy using a probe such as a tooth pick, stiff piece of wire, or an opened paper clip, but you get serious old-school blind cred if you use a stylus! <br />
<br />
Often the easiest way is to count your way along a row of sockets with the stripped end of the wire you’re planning to insert. Finally, you can most easily find the gap between upper and lower header sections with a fingernail, or by running the side of the probe along the edge of the header block.<br />
<br />
<h4>Acknowledgements</h4><br />
Once again, my thanks to John Schimmel of <a href="http://diyability.org">DIY Ability</a>, this time for transcribing the socket information off of a JPG and for providing awesome background links.Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com2tag:blogger.com,1999:blog-498071590791194008.post-91777017614611304962016-01-02T13:33:00.000-08:002017-12-01T16:53:30.901-08:00Arduino Setup and Accessibility Tips for Windows<h4>Background</h4><br />
In a world of talking iPhones, sexy accessibility announcements, and high-quality open-source screen readers, the naive sighted person could be forgiven for assuming that we have finally reached the point where a blind person could simply download and use the same exact software tools as everyone else for any given problem. Blind people know that it is rarely that simple. There are a wide variety of issues that still stand as barriers to equal access in all sorts of situations, and Arduino development on Windows is no exception. While it is definitely possible to set up an accessible development environment for Arduino on Windows, many of the steps may not be immediately obvious, especially to the beginner. <br />
<br />
This post is intended to streamline the Arduino setup process, flagging accessibility work-arounds, and providing a step-by-step guide to setting up the tools you’ll need for Arduino development as a blind maker. <br />
<br />
More advanced readers may want to check out the detailed source materials. Much of the information in this post comes from <a href="https://github.com/arduino/Arduino/blob/ide-1.5.x/build/shared/manpage.adoc">a more complete discussion of the Arduino command line</a> on github.<br />
<br />
If you are just getting started and don’t know anything about Windows, software development, accessibility, or Arduino, this blog is probably not the best place to start. This article assumes you’re already comfortable with Windows and your screen reader, and that you know what Arduino is and have some motivation to make things with it. <br />
<br />
<h4>About the Arduino IDE</h4><br />
Arduino sketches and many other kinds of software are usually developed in an application called an Integrated Development Environment (IDE). An IDE allows you to edit your code and turn it into a program that actually runs and does something. In the case of Arduino, the IDE compiles the source code and uploads it to the Arduino board. It also helps you find errors in your code and has many other helpful features. <br />
<br />
The Arduino IDE is written in Java which makes it easier to deploy on a bunch of different platforms (i.e., Windows, Mac, and Linux). Unfortunately, Java applications on Windows present some issues for screen readers, and most, like the Arduino IDE graphical user interface, are not readily accessible. It is possible to <a href="http://blarbl.blogspot.com/2016/08/configuring-arduino-ide-with-java.html">configure the Java Access Bridge for the Arduino IDE to let NVDA work quite well</a>, but that's the topic of another post.<br>
Luckily, the Arduino IDE also includes a command line interface that lets a blind user access most of its critical features from a Windows DOS Prompt -- that's what this article is all about.<br/>
<h4>Installing the Arduino IDE</h4>
Follow these steps to install the IDE on your Windows machine:<br />
<br />
<ol><li>Make sure you have Administrator privileges. If you don’t, you will need to get the owner of the machine to install the software.</li>
<li> <a href="https://www.arduino.cc/en/Main/Software">Download the Arduino IDE</a>. It needs to be later than version 1.5 in order to support the command line interface.</li>
<li>After downloading, run the Arduino IDE installer and follow the prompts. This should be relatively straight-forward using NVDA or JAWS. </li>
<li>During installation, note the directory in which Arduino is being installed. This will be helpful when configuring the IDE, discussed in the next section.</li>
</ol><br />
<h4>Configuring the Arduino IDE from the DOS Prompt</h4><br />
The DOS Prompt is a command line interface to your Windows computer. It is a terminal window where you can type commands and the responses to those commands appear as text which scrolls up from the bottom of the window. This post assumes you have used it before and that you have some familiarity with it. If not, do a little reading starting with this nice little <br />
<a href="https://kb.wisc.edu/page.php?id=903">article on the DOS Prompt from the University of Wisconsin Knowledge Base</a>.<br />
<br />
The DOS Prompt can be started by opening the Run Dialog (Windows+R) and typing cmd, followed by Return or pressing OK. <br />
<br />
When using the DOS Prompt with a screen reader, you should turn on the screen reader’s terminal mode. This will automatically read new text as it appears. NVDA users can toggle this mode using NVDA+5, while JAWS users should use JAWS+S. For more information on Terminal Mode, check your screen reader’s documentation.<br />
<br />
After starting the DOS Prompt, change the current directory to the Arduino installation directory which you noted during installation. This will save you a lot of extra typing. <br />
<br />
Change the current directory by typing:<br />
Cd ArduinoDirectory<br />
<br />
Where ArduinoDirectory is the path where you installed the IDE. If you installed to the default location, you will need to put the path in double quotes since it contains spaces. For example, I used the default location:<br />
C:\Program Files (x86)\Arduino<br />
<br />
Since the path contains spaces, use double quotes around the directory name to let the DOS interpreter know that it all goes together like this:<br />
cd "c:\Program Files (x86)\Arduino"<br />
<br />
If you don’t type the directory name correctly, or if you don’t use quotes properly, the DOS interpreter will complain. If you type it correctly, the new prompt (the line of text which lets you know that it’s ready for the next command) will be the name of the Arduino directory – in my case, c:\Program Files (x86)\Arduino.<br />
<br />
To configure the Arduino IDE from the command line, use Arduino_debug.exe, not Arduino.exe itself. This means that all of the commands we will be typing for things like Arduino configuration or uploading will begin with Arduino_debug, followed by additional command elements called command line arguments. No, we’re not being obstreperous, that’s just what they’re called.<br />
<br />
The following sections describe how to set two important Arduino preferences: the com port to which your Arduino board is connected, and the particular Arduino board you are using. <br />
<br />
<h5>A Few Notes on Error Messages and GUI Pitfalls</h5><br />
Unless you have correctly installed the Java Access Bridge, the Graphical User Interface (GUI) of the Arduino IDE is mostly inaccessible using a screen reader, but a few bits of information do get through. Window names are about the only thing readable by NVDA or JAWS. When working with the command line interface, you may get error messages, warnings, and other unreadable GUI windows that pop up. In the case of error messages and warnings, you can simply dismiss them by hitting Return or Escape. <br />
<br />
You may also accidentally launch the Arduino editor if typos make it seem like you are trying to start a new sketch. In this case, a warning will be followed by an editor window which opens with the name of a new sketch based on the current date. You can dismiss this window with Alt+F4, provided that you haven’t accidentally typed anything into the editore window. Otherwise, the IDE will put up an additional unreadable dialog asking if you want to save your changes to the sketch. You don’t, so simply hit Alt+N to select the No button and return to the DOS Prompt window.<br />
<br />
<h5>Setting the Arduino IDE COM Port Preference</h5><br />
First let’s set the port to which the Arduino is connected (e.g., COM 5). The Arduino connects by USB, but Windows sets up a serial connection through that USB port which emulates a COM port. The COM port is used for uploading code, sending commands, and monitoring output with a terminal program. <br />
<br />
After connecting your board to your computer with a USB cable, you can check your Windows Device Manager under USB ports to find out what COM port the Arduino is using. If the Arduino is connected, it should appear in the Device Manager Device list under USB along with the name of the COM port to which it is connected.<br />
<br />
Note: The COM port number may change from session to session depending on the physical USB port you use and what other serial communications are active over USB or Bluetooth at any given time. When in doubt, check the device manager again to verify the current COM port being used by your Arduino board. In practice, it’s a good idea to always use the same physical USB port when connecting your Arduino to your development computer.<br />
<br />
You can set the COM port used by the Arduino IDE with the following command at the DOS prompt:<br />
arduino_debug --port comPort --save-prefs<br />
<br />
Where comPort is actually the COM port you found in the Device Manager. The --save-prefs switch specifies that you want that port value to be saved in the preferences file and used by default. For example, my Arduino board usually ends up on COM5. To set my default Arduino port to COM5, I type:<br />
arduino_debug --port com5 --save-prefs<br />
<br />
If the setting change is successful, you will get a few lines of output in the DOS Prompt window saying things like, “Loading configuration…” and “Loading packages…”. If the command is unsuccessful, You will get unreadable error boxes from the Java-based IDE. In this case, just hit Return to dismiss them. If you mistype the command, or if something is wrong, you may also get error messages in your DOS Prompt window. These messages may be helpful in figuring out what is wrong. Use your screen reader review commands to see if you can infer anything useful. Often, typos are the culprit…<br />
<br />
<h5>Setting the Arduino Board Preference</h5><br />
After successfully setting the communication port, it is time to tell the IDE what Arduino board you are using. This is done with the --board argument followed by a special package:arch:board parameter. Check the documentation associated with your particular board for the right parameter to use here. For example, to configure your IDE for an Arduino Uno board, you would type:<br />
arduino_debug --board arduino:avr:uno --save-prefs<br />
<br />
If this parameter change is accepted you’ll get a few lines of innocuous output in the DOS Prompt window without any dialog or error boxes. If something is wrong, the IDE will throw up unreadable error boxes which need to be dismissed with Enter or Escape. Check the DOS Prompt window for meaningful text error messages before trying again.<br />
<br />
<h5>Verifying Preferences</h5><br />
You can verify your settings by asking the IDE to tell you what the current port and board are using the --get-pref argument. To get the port preference, type:<br />
arduino_debug --get-pref serial.port<br />
<br />
To get the board preference, type:<br />
arduino_debug --get-pref board<br />
<br />
As usual, typos or incorrect commands will yield unreadable error boxes, while well-formed and correct commands will report the current COM port or board in the DOS Prompt window.<br />
<br />
Note: you can get a massive list of all of the current parameters of the Arduino IDE by typing:<br />
arduino_debug --get-pref<br />
<br />
<br />
That's it -- you're done with the setup. Now you’re ready to start uploading sketches to your board, but that’s another article!<br />
<br />
<h4>Acknowledgements</h4><br />
I’d like to give a special shout out to John Schimmel of <br />
<a href="http://diyability.org">DIYAbility in New York City</a><br />
who helped me find a good deal of the information in this and subsequent posts. He also held my hand and shouted encouragement for my first few Arduino baby steps. Thanks also to all the blind and sighted Makers who support this project – Chancey Fleet, Ben Einstein, Laura Eberly, Jim Barbour, Brian Buhrow, Erin Lauredsen, Will Butler, Bryan Bashin, and others. Blind Arduino is a project of <br />
<a href="http://www.ski.org">Smith-Kettlewell</a> and <br />
<a href="http://www.lighthouse-sf.org">LightHouse Labs</a>.<br />
Joshua Mielehttp://www.blogger.com/profile/12928809284167684237noreply@blogger.com17