This is a tutorial to get started with Arduino Uno. We will measure the temparature and the luminance and display the results on a webpage. However, the implementation will be generic so that any analog and digital input can be read. As well all digital outputs can be changed.
- Get an Arduino Kit. We are working with learning set #8 from Funduino
- Install Visual Studio Code if you haven't already.
- Make sure Node.js and NPM are installed on your machine.
- Install the Arduino CLI
In this setup the WebSocket sever will run on websocksrv.herokuapp.com and the webserver on tfbern.github.io.
- Attach the temperature sensor TMP36 to analog input A0 (make attention to the polarization)
- Attach Arduino Uno to the Computer via USB
- Compile the sketch genericReadWrite and upload it to Arduino
arduino-cli compile arduino/genericReadWrite -u
or use Ctrl+Shift+B - In the in the gateway folder.
- Run
npm i
to install the dependencies - Run
nodemon
to start the serial-to-websocket gatway
- Run
- Open the GUI from http://tfbern.github.io.samhess.ch/m121/index.html
In this setup the WebSocket sever will run on localhost:81 and the webserver on localhost.
- Attach the temperature sensor TMP36 to analog input A0 (make attention to the polarization)
- Attach Arduino Uno to the Computer via USB
- Compile the sketch genericReadWrite and upload it to Arduino
arduino-cli compile arduino/genericReadWrite -u
or use Ctrl+Shift+B - In the in the server folder.
- Run
npm i
to install the dependencies - Run
nodemon
to start the server
- Run
- Open the GUI on http://localhost
- www.arduino.cc
- Sprach-Referenz
- Built-In Examples
- Blink Without Delay
- Arduino Programming Cheat Sheet
- Arduino Befehlsübersicht
- The Evils of Arduino Strings
- What is Heap Fragmentation?
- Dynamic Memory Allocation and Fragmentation in C and C++
- Speicher in Embedded Systems
- AVR Libc
- C++ vs. The Arduino Language?
- How C Program Stored in RAM?