Now that the hardware is set up and you have successfully run the Hello, world! sketch, it is time to bring the real firmware on the device, to make it do something useful.
- Copy the sketch folder from this repository
src/sketches/order_button
to your sketchbook location of your Arduino IDE (usually located in theArduino/
folder in your homedir. CheckFile
>Preferences
>Sketchbook location
in the Arduino IDE). Your Arduiono folder should now look like the following:
+--Arduino Arduino sketchbook location
+--libraries Library folder
+--PubSubClient The MQTT client libraray
+--order_button sketch folder for the order button
+--order_button.ino Main file
+--config.h-dist config.h template
+--PushButton.h source files ...
+--DigitalOutput.h
+--...
- copy the file
config.h-dist
to a new file namedconfig.h
- browse through the source code of the
order_button.ino
andconfig.h
files and fix the marked parts (i.e. parts marked with/*FIXME*/
) - compile and upload the sketch. Carefully watch for errors.
Congratulations, you have successfully compiled and put the firmware on the device! Now it is time for some testing.
Next: Testing the device