traffic_lights
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| traffic_lights [2026/07/19 17:28] – [Wiring] walkeradmin | traffic_lights [2026/07/21 08:51] (current) – [Traffic Lights] walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Traffic Lights ====== | ====== Traffic Lights ====== | ||
| - | <color #db5f0b>Jun 2026</ | + | <color #db5f0b>Jul 2026</ |
| \\ | \\ | ||
| \\ | \\ | ||
| Line 6: | Line 6: | ||
| ---- | ---- | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| + | \\ | ||
| + | Works with: | ||
| + | * Raspberry Pi Pico | ||
| + | * RP2040 Zero Mini | ||
| \\ | \\ | ||
| The following code works with both the Raspberry Pi Pico and the RP2040 boards from Ali. The difference is that we are using different GPIO pins. On the RPi Pico, we are using Pins 2, 6 and 10. The reason for this is that the RPi Pico has a GND pin next to each of these GPIO pins, so wiring is very simple. | The following code works with both the Raspberry Pi Pico and the RP2040 boards from Ali. The difference is that we are using different GPIO pins. On the RPi Pico, we are using Pins 2, 6 and 10. The reason for this is that the RPi Pico has a GND pin next to each of these GPIO pins, so wiring is very simple. | ||
| Line 16: | Line 20: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | {{ : | + | {{ : |
| \\ | \\ | ||
| Above we can see the wiring for the RP2040 and the LEDs. | Above we can see the wiring for the RP2040 and the LEDs. | ||
| Line 77: | Line 81: | ||
| time.sleep(1) | time.sleep(1) | ||
| </ | </ | ||
| + | \\ | ||
| + | That's it. You should now have a working set of traffic lights :) | ||
| + | \\ | ||
| + | \\ | ||
| + | ---- | ||
| + | ==== Working Example ==== | ||
| + | |||
| + | Here is a short video of a working example. | ||
| + | \\ | ||
| + | \\ | ||
| + | {{ : | ||
| + | \\ | ||
| + | I hope you have some fun with this project. | ||
| + | \\ | ||
| + | \\ | ||
| + | ---- | ||
| + | |||
traffic_lights.1784482085.txt.gz · Last modified: by walkeradmin
