WiFinch: Hacking with Arduino
The WiFinch WiFi servo board can be hacked using the Arduino software. This will allow you to program your own controls into the WiFinch. If you don't want to use the App or maybe you want to add other functions to the WiFinch, it can all be done using Arduino. Before getting started lets download Arduino.
Step 1: Install Arduino
Download Arduino here , Its available for all operating systems!
Next you want to follow the installation guide for your operating system. For Windows you simply need to extract the .zip file and run the Arduino executable.
Step 2: Install board compiler
Once you have installed Arduino we need to install some files that will let us Hack into the WiFinch. The package we need to install is the board manager package. It contains all of the specific files that are needed to program the WiFinch board.
With Arduino open select File -> Preferences
You will see the above window open. Now you will need to add some text to the field Additional Boards Manager URLs
Once this is done you can click OK.
Now we need to open up the board manager. This can be found under Tools -> Board -> Boards Manager. Once the board manager is open type ESP8266. The ESP8266 is the chipset that the WiFinch uses as its controller.
This installation may take a couple of minutes. Once it is finished you can close the boards manager window.
Step 3: Installing the WiFinch library
The WiFinch board has a special servo driver chip on it. This is a chip that is not normally found connected to Arduino devices. Because of this, we need to add the required libraries to the Arduino IDE. First we will need to get the library. This can be found on Github.
Go to the link above and click Clone or Download -> Download ZIP
Once this file is downloaded you will need to add it to the Arduino libraries folder. This can be done by clicking Sketch -> Include Library -> add .ZIP library. Then navigate to the zip file in your downloads folder. This will be added to your library.
For more information on adding libraries check out this link
Step 4: Setting up Arduino for the WiFinch board
Each Arduino board is different in one way or another. In our case there are a number of different parameters that need to be changed in order to communicate with the WiFinch board. These parameters can be found under tools. Change the following parameters under tools.
- Board: Generic ESP8266 Module
- Upload Speed: 115200
- Flash Size: 4M (1M SPIFFS)
- Port: Select the comm port (most likely not COMM1)
You can leave all other settings alone
Step 5: Program Something!
Now the fun part. Writing your first program. For our first program we will blink the LED that is located on the WiFinch board. To do this we want to enter the following code into the Arduino editor.
Once this code is entered into Arduino, hit the compile button (The check-mark). The code will compile and you will now be able to upload the code to your board.
Uploading the code is a little tricky. Before we upload the code we need to make sure our board is plugged into the USB power, switched on, and you have the right Port selected. Once this is done, we need to press some of the buttons on the board in the right order to put the board in program mode.
- Hold down the Reset button
- Press and hold the Flash button
- Release the Reset Button
- Release the Flash Button
Once you have done this you can click the upload button in Arduino. Once the code uploads you should now see a blinking light!