Digispark USB Development Board
Hi there... :-) Today we will look into the Digispark USB Development Board. This board was first introduced in Kickstarter by Erik Kettenburg. You may view for more details of the product in their official page.
Below are the details of the board.
The pinout of the Digispark board is as shown below
The pinout above was done using the Fritzing. You may refer to my previous post on Fritzing. Now we have known the pinout, we start to see how we can program the Digispark board. There few ways to program the Digispark board. In our case, we will program the board using the Arduino IDE. The first step to begin with the programming is to make sure we installed the Arduino IDE. If you dont have one, you can download this from Arduino official site.
Below are the details of the board.
The pinout of the Digispark board is as shown below
The pinout above was done using the Fritzing. You may refer to my previous post on Fritzing. Now we have known the pinout, we start to see how we can program the Digispark board. There few ways to program the Digispark board. In our case, we will program the board using the Arduino IDE. The first step to begin with the programming is to make sure we installed the Arduino IDE. If you dont have one, you can download this from Arduino official site.
Once we have opened the Arduino IDE. Go to Tools --> Board --> Board Manager. After that type "Digispark" in the search column. The video below illustrates the steps above.
Now we can start to program the Digispark board. But before that, we need to have a driver installed in order for the board to be recognized. The driver can be downloaded from Github. Please follow the link here. Choose the appropriate driver that suits you.
We are all set to go. As a starter, we can try to run the sample program that comes with the board.
The sample program can be found at Files --> Examples --> Go to "Examples for Digispark" Digispark_Examples --> Start. Video below shows the steps.
Once the example file is opened, we can compile and download it. One unique thing about this board is that we only connect the board to the PC when it is prompted. If you have connected the board in advance, it will not take effect. You will need to disconnect it and reconnect again.
The example program which we are looking at is a simple led blink. Basically what the program does is that it will blink the led on for 1 second and off for one second in a continuous loop. Below is the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(0, OUTPUT); //LED on Model B pinMode(1, OUTPUT); //LED on Model A or Pro } // the loop routine runs over and over again forever: void loop() { digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(1, HIGH); delay(1000); // wait for a second digitalWrite(0, LOW); // turn the LED off by making the voltage LOW digitalWrite(1, LOW); delay(1000); // wait for a second } |
The output of the code is as below
This is a very basic introduction to the Digispark board. In the next upcoming post, we will look into more detail of the board by trying to make simple interfacing to other devices such as sensors.
Thank you.
No comments:
Post a Comment