Variable Types

A variable is a special, small place in memory that stores information. To refer to this memory location and use it, we refer to its location by a name we make up, the variable name. There are two types of numbers we will put in a memory location: long: an integer that spans a larger […]

Read More

Hello World for Arduinos

It is tradition that whenever you learn a new language or turn on a new computer, the first command you send is “hello world”.  It started with Brian Kernighan in 1978 when he introduced the C language. In Arduino speak, instead of printing the words “hello world” to announce to the world our Arduino is […]

Read More

Using the Delay() Function and Auto Format

One of the ways of adjusting the timing flow in a sketch is with the Delay() function. Usually, if a command has a () after it, it is a function. The delay() function is built into the Arduino IDE. You can look up the details for the delay() function in the reference page. When the […]

Read More

The void loop() Function

Every Arduino Sketch has a void loop() section. The presence of the () at the end indicates this command is a function, a special routine that is executed when the code comes down to it. This function will cause all the code between the { curly } brackets is executed, starting at the top line. […]

Read More

Where to Find The Commands

In this series of experiments on the www.HackingPhysics.com web site, we’ll be introducing many of the common and useful commands. However, its always useful to know where to get more information. Before you google “Arduino common commands” you should check the reference page that is built into the IDE.  Under Help select the Reference item […]

Read More

Controlling Digital I/O

As the very first operation, we will turn on the LED that is already mounted to the Arduino Board next to pin 13, as shown in the figure below. Each digital pin on the right side of the board is labeled 0 to 13. The pin labeled 13 is significant since it is the only […]

Read More

Upload a Sketch for the First Time

The right pointing arrow at the top of the sketch is the upload button as shown below. Click this arrow and the sketch will be uploaded to the Arduino, if everything is working. Try it. You will see some words go by at the bottom of the sketch and hopefully some lights flash on the […]

Read More

Connect Your Arduino to the USB Cable

All the drivers for the USB port to recognize the Arduino are installed when the IDE is set up. When the USB cable is plugged into the Arduino, you might hear the “happy sound” of a device being recognized by the USB port. In addition to the physical connection with the USB cable, we need […]

Read More

Open a New sketch

Under File select New, as shown in the figure. This will open a new, blank sketch, looking like the below.   A new window opens up with the following simple sketch. This is the absolute minimum sketch.   void setup() {   // put your setup code here, to run once:   }   void loop() […]

Read More

Running the IDE for the First Time

Once the IDE is installed, run it by double clicking on the icon. A new sketch will open up. A good first step is to adjust the preferences file. This is found under File/preferences, as shown in the figure below. Here is the window that opens up: Once this window is open I find it […]

Read More

The Universal Globe Spins in the Wrong Direction

What a geek I am. Here we were at Universal Studios Park in Orlando, FL to visit Potter World and the first thing I notice is the Universal Globe is spinning in the wrong direction. It’s the right hand rule. Curl your fingers in the direction of rotation and your thumb points in the direction […]

Read More

Field of View of our Small Imaging Sensors

In an earlier column about field of view, I showed that the focal length of a telescope really translates image size at the focal plane into an annular size of the object. The angular size, is the angular field of view. The connection is: To estimate the angular size of the field of view of […]

Read More

Taking out a streetlight with a laser pointer

There is a very obnoxious street light located behind the dome of the Addie Rose Observatory. It is almost in the sight line to Polaris. This make most of the views around the celestial north pole inaccessible. The solution is to take out the light when I want to observe north. While some of my […]

Read More

Testing the speed of an internet connection

We all have a need for speed. When I want to measure how fast (or slow!) my interconnect connection is, I use the online test at www.SpeedTest.net. It doesn’t get much simpler than this. Go to the website. Watch out for the false “start now” button. While the site is free, and supported by ads, […]

Read More