Projekt konfigurierbare ambient Beleuchtung
Kursthemen
-
-
Herzlich Willkommen zum Projekt "ambient-Beleuchtung"
Für Dein Beleuchtungsprojekt tauchst Du in verschiedene Ingenieurdisziplinen ein:
Du lernst elektronische Bauelemente kennen, lötest Bauteile passend zusammen, programmierst coole Lichteffekte und stellst ein eigenes Gehäuse mit einem 3D-Drucker her.
-
-
-
Install Arduino IDE
Check the ardunio Website to download and install the Integrated Development Environment
-
-
-
Hier geht es zu einem Kursraum mit Hinweisen zur Programmierung mit Arduino- und ESP-Boards:
https://virtueller-campus-thueringen.de/course/view.php?id=116
-
-
-
Install the Statemachine Library
Background information on how to build and install own libraries can be found here.
- Download the statemachine_START.zip library.
- In File->Preferences the sketchbook location is given.
Uncompress the content of the statemachine.zip file into the library folder of the Sketchbook location. - An additional subdirectory shall now be available
Task
Control the street crossing safely!
- Understand a single traffic light! How does it work?
- Understand the street crossing ... How is it working?
- What are the different and possible states?
Understand Statemachines
Now, we encode the complete street crossing as one state each. Check the following statechart.
What is still missing? How could you improve the statechart towards a complete and working street crossing?
Implementation of Statemachines
This content can be found in statemachine.cpp (the one you copied in the first step)
Arduino Source Code
Use the following source code to implement the street crossing control with a statechart!
- Ampel_00.ino
- Refactoring
- Check the
uint32_t TRAFFIC_LIGHT_RED = WS2812B.Color(255, 0, 0);
line. - Update all the Ampel1_rot(), Ampel1_rotgelb(), Ampel1_gelb(), ... functions with the above abbreviation to improve the readability of the code.
- Check the
Arduino Hardware
- Check the attachInterrupt() Arduino function.
- What does this function do?
- What is an interrupt?
- Uncomment the attachInterrupt() function in your INO-file.
==========================
Lösung- Library statechart_LSG.zip
- Ampel_01.ino
-
-
-
Write the code to display any textual message, char by char. You may use examples like this to get own ideas.
- How about different colors?
- how could you connect several 8x8 RGB LED matrices?
-
-
-
NeoPixel Library
- Library website
FastLED Library
- Library website
-
-
-
Use the microphone to capture audio and display a graphic version of it.
-