This is the code from my bachelor thesis at HfG Schäwbisch Gmünd.
Since then, this project is becoming a reality. You can find the real software → here.
- Download and install Node
- Download the repository
- Open repository in terminal
- Type
npm install
The hardware is connected via bluetooth (I know, I know, unnecessary, but when I started to build the prototype there has been more intended). The brain is called "SNES" as bluetooth device.
- Make sure the brain is powered and connected via bluetooth
- Open the repository folder in terminal and type
npm start
- Once started the brain should automatically connect to the software (success is displayed when all LEDs flash yellow once)
If the hardware does not connect the Live View window will automatically reload again to try to reconnect.
The intended demo is like this:
"We want to prototype a desk lamp, which can be adjusted to the light temperature of the room, similar to the 'night-shift mode' or 'True Tone display' on a Mac / iPhone."
- Display live values of pins (1 -> Button, 5 -> Potentiometer)
- By hitting the "open project" button in the upper right (document with arrow) a new window pops up, showing the IFTTT programming
- One component is needed for the project but not set up -> Slot 3 is lighting red within project window as well as the hardware brain
- Setup new component by:
- Connecting the LED strip to slot 3 (the one in red)
- Clicking slot 3 in Live View and click "Set Up", then "Use"
- LED strip should light up bright
- Setup new IFTTT card:
- Click +
- step by step select dropdown, so this sentence is built: "If Main Button is held, then LED Strip fades colour to red"
- A new "+" should appear
- To start the project press the "play" button in the upper right corner.
- Now everything should run as described, so:
- Press button once, LED strip should toggle as well as reset the colour to white
- Turning the potentiometer should adjust the brightness
- Press & hold the button should turn the LED strip slowly to red / warm white
- The demo just allows one click-through. To restart the demo, press the two-arrow button within the project. The demo will now stop and restart everything from the start
The interface is just a hardware element to test basic actuators. This prototype has two features: LED strip and Servo.
To use it simply plug it into a power source (e.g. the power bank) and start turning the knob. It has three modes (visible through the upper left LEDs) which can be switched via the button on the upper right.
- LED Strip: turning – adjust brightness (e.g. pulsating), pushing – instantly set to 100% (e.g. flashing)
- – Not set –
- Servo: turning – adjust the angle of the servo