Periscope Logic Lights

Estimated reading time: 3 min

The Periscope Logics are a custom PCB kit for Matt Zwarts Domelift Periscope – but should fit almost all Periscopes.
It needs 5V and can run standalone or be controlled via serial command or I2C.
Firmware is still not final but running the needed sequences.
(we just want more sequences and full integration into the Benduino/Marcduino system)

Revisions:

Current version:

ESP32 Lolin C3 Mini (easy programmable via USB)

Old versions:

ESP32 (programmable via serial pins)
ATmega328P (programmable via serial pins)

If you notice strange colors after uploading the sketch, please check the version of the FastLED library.
Currently, it seems all recent versions might cause issues. Please test and use previous versions instead.
Working Fastled version: 3.9.0

ESP32 C3 Mini Version:

C3 Mini Enhanced Sketch v2.1 +

Quick Start Guide

What You Need
  • R2D2 Periscope with LED controller installed
  • USB cable (USB-C for Lolin C3 Mini)
  • Computer with Arduino IDE or Serial Terminal
  • 5V power supply (3A or more)
First Time Setup
  1. Connect USB cable to your computer
  2. Open Serial Monitor (Arduino IDE: Tools → Serial Monitor)
  3. Set Baud Rate to 9600
  4. Set Line Ending to “Newline” or “Carriage Return”
  5. Type ON and press Enter – LEDs should start!

Basic Commands

Power Control
CommandWhat it does
ONTurn on all LEDs
OFFTurn off all LEDs
XAlternative way to turn off
?Show help menu
Pre-Made Light Shows (Sequences)

Just type the command and press Enter:

CommandLight ShowDescription
Q0R2D2 ClassicOriginal startup sequence
Q1Party ModeColorful rainbow effects
Q2Bright PulseBright white pulsing
Q3CommunicationFast data transmission effect
Q4Police LightsRed & blue emergency lights
Q5Red AlertWarning alarm pattern
Q6Knight RiderKITT scanner effect
Q7SearchlightBright white scanning
Q8Stealth ModeDim red scanning
Q9DivingBlue water effect going down
Q10SurfacingCyan water effect going up
Q11Calm BlueRelaxing blue pulse
Q12System BootGreen startup sequence
Q13Hidden ModeMinimal purple activity
Q14CelebrationVictory rainbow party
Q15ChargingBlue energy charging up
Q16HyperdriveStar Wars warp effect
Q17MalfunctionRed/yellow electrical fault
Q18Scan DoneGreen completion sweep
Q19Sonar PingSubmarine sonar effect
Q20Demo ModePlays all sequences automatically
LED Groups Explained
         [TOP - 7 LEDs]
              ↑
    [LEFT]  [MAIN]  [RIGHT]
   9 LEDs   9 LEDs   9 LEDs
              ↓
        [BOTTOM - 8 LEDs]
              ↓
         [BACK - 3 LEDs]
LED Group Codes
  • M = Main (center, 9 LEDs)
  • T = Top (7 LEDs)
  • B = Bottom (8 LEDs)
  • S = Sides (both left & right)
  • L = Left only (9 LEDs)
  • R = Right only (9 LEDs)
  • K = Back (3 LEDs)
  • A = All LEDs at once
Custom Effects
Basic Format

[Group][Effect][Color][Speed]

Example Commands

Simple Examples
  • M185 = Main LEDs, Effect 1, White, Speed 5
  • T200 = Top LEDs, Effect 2, Red, Speed 0 (slow)
  • A199 = All LEDs, Effect 1, Pink, Speed 9 (fast)
Step by Step Example

Let’s make the top LEDs do a blue chase effect:

  1. T = Top LEDs
  2. 6 = Chase effect
  3. 4 = Blue color
  4. 7 = Fast speed

Command: T647

Available Colors:
NumberColor
0Red
1Yellow
2Green
3Cyan
4Blue
5Magenta
6Orange
7Purple
8White
9Pink




Speed Settings
  • 0 = Slowest
  • 5 = Medium
  • 9 = Fastest

Popular Effect Numbers

Main LEDs (M)
  • 0 = Off
  • 1 = Pulsing
  • 2-5 = Spinning effects
  • 9 = Strobe
  • 12 = Rainbow
Top LEDs (T)
  • 1 = Left to right
  • 5 = Comet
  • 11 = Knight Rider scanner
Sides (S/L/R)
  • 1 = Pulse
  • 5 = Strobe
  • 7 = Fire effect

Tips & Tricks

1. Start Simple

Begin with sequences (Q0-Q20) before trying custom commands

2. Demo Mode

Type Q20 to see all effects automatically (15 seconds each)

3. Emergency Off

Type X or OFF to quickly turn everything off

4. Combine Effects

You can send multiple commands:

M185
T647
B209

This creates a custom combination!

5. Save Power

Lower speed numbers use less power and create calmer effects

Troubleshooting

LEDs won’t turn on?
  1. Check USB connection
  2. Try ON command
  3. Check power supply
  4. Try Q0 for default sequence
Commands not working?
  1. Check baud rate is 9600
  2. Press Enter after each command
  3. Commands are CASE SENSITIVE (use capitals)
  4. Try the ? command for help
LEDs flickering?
  • Power supply might be too weak
  • Try reducing brightness in the code
  • Check all connections
Status LED

The small LED on the controller blinks every second to show the system is running. This is normal!

Have Fun!

Experiment with different combinations and find your favorite effects. The periscope is designed to be eye-catching and fun!

Remember:

  • Q20 shows all effects in sequence
  • Q7 is great for getting attention
  • Q11 is perfect for calm ambiance
  • OFF or X turns everything off

ESP32 Version:

The advantages are that WiFi and bluetooth are available as additional connection options.

Mimir created a sketch to make the periscope board compatible with the Uppity Spinner:
https://github.com/rimim/R2D2_Periscope_esp32

The sketch has been modified to work with the Uppity Spinner ABC 3-pin reverse logic sequence select instead of Serial.
To revert back to Serial change this line:
#define UPPITY_SPINNER_MODE
To this:
//#define UPPITY_SPINNER_MODE
Connect rotary board pin A to to RX, rotary board pin B to SDA, and rotary board pin C to SCL. Connect rotary GND pin to GND pin on the light kit

Programming the ESP32 Version:

You need an FTDI programmer.
Connect 5V and GND as usual.
Cross connect RX and TX (RX goes to TX and vice versa)

Start the upload in the Arduino IDE and wait till you see this in the output:
…..——…..—–…..—–

Then press and hold the flash button
Press the reset button briefly (reset is still pressed)
Release the reset button

The upload should now start.

EPS32 Pinout:

Top LightsIO33
Bottom LightsIO17
Main LightsIO27
Left LightsIO16
Right LightsIO25
Rear LightsIO26
RXIO3
TXIO1
SDAIO21
SCLIO22

Arduino 328P Version:

Same functions (except wifi & bluetooth) like the newer Esp32 version.

The sketch has been modified to work with the Uppity Spinner ABC 3-pin reverse logic sequence select instead of Serial.
To revert back to Serial change this line:
#define UPPITY_SPINNER_MODE
To this:
//#define UPPITY_SPINNER_MODE
Connect rotary board pin A to to RX, rotary board pin B to SDA, and rotary board pin C to SCL. Connect rotary GND pin to GND pin on the light kit

Pinout corresponding to the sketch:

Pin 5 – Main Lights
Pin 10 – Right Side
Pin 3 – Left Side
Pin 2 – Bottom Leds
Pin 6 – Top Leds
Pin 9 – Rear Leds

Available at shop.printed-droid.com

Tags:
Was this article helpful?
Dislike 0 1 of 1 found this article helpful.
Views: 1711
Previous: Magic Panel
Next: Magic Panel 32 (wireless)