This shows you the differences between two versions of the page.
iothings:proiecte:2022sric:ledring [2023/05/28 13:40] mihaela.nuta1207 [Code] |
iothings:proiecte:2022sric:ledring [2023/06/02 08:13] (current) mihaela.nuta1207 [Components:] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Led Ring with Web Application ====== | ====== Led Ring with Web Application ====== | ||
- | Author: Nuță Mihaela-Mădălina | + | Author: --- //[[mihaela.nuta1207@stud.acs.upb.ro|Mihaela-Mădălina NUȚĂ (101594)]] 2023/06/01 11:40// |
===== Introduction ===== | ===== Introduction ===== | ||
The purpose of this project is to control a NeoPixel Led Ring in a beautiful manner. | The purpose of this project is to control a NeoPixel Led Ring in a beautiful manner. | ||
Line 16: | Line 15: | ||
* Wires | * Wires | ||
* Breadboard | * Breadboard | ||
+ | * Resistor | ||
==== The electronic schema that I created with www.draw.io ==== | ==== The electronic schema that I created with www.draw.io ==== | ||
Line 38: | Line 38: | ||
* type of selection: color | * type of selection: color | ||
* the color as an array of 3 values | * the color as an array of 3 values | ||
+ | |||
+ | When switching the style using the button, the microcontroller is setting the selected style as **switch** and it loops through the styles until another action is made using the Web Application. | ||
The microcontroller is connected to the WIFI. Using the WIFI connection, it is reading from the database in a loop and based on the provided data, it changes the style of the led ring. | The microcontroller is connected to the WIFI. Using the WIFI connection, it is reading from the database in a loop and based on the provided data, it changes the style of the led ring. | ||
Line 111: | Line 113: | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | Button interactions: | ||
+ | <code> | ||
+ | pinMode(BUTTONPIN, INPUT); | ||
+ | </code> | ||
+ | <code> | ||
+ | if (digitalRead(BUTTONPIN) == 1) | ||
+ | { | ||
+ | Firebase.RTDB.setString(&fbdo, "/data/type", "switch"); | ||
+ | switchStyle = (switchStyle + 1) % 7; | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ===== Demo ===== | ||
+ | [[https://www.youtube.com/watch?v=ww6ns7aVLCk]] | ||
+ | |||
===== Conclusion ===== | ===== Conclusion ===== | ||
- | ===== Bibliography===== | + | The Led Ring can be easily controlled using both the web application and the push button. |
+ | A missing functionality could be the possibility to create more user accounts in order to let every user to define its own set of predefined styles. It could be nice :-D. | ||
+ | ===== Bibliography===== | ||
+ | * [[https://firebase.google.com/docs/hosting/quickstart]] | ||
+ | * [[https://forums.adafruit.com/viewtopic.php?t=41143]] | ||
+ | * [[https://alvarotrigo.com/blog/css-text-animations/]] | ||
+ | * [[https://ocw.cs.pub.ro/courses/iothings/laboratoare/2022/lab4]] | ||
+ | * [[https://ocw.cs.pub.ro/courses/iothings/laboratoare/2022/lab3]] | ||
+ | * [[https://www.adafruit.com/product/1586]] |