elecena.pl

Tri-Color USB Controlled Tower Light with Buzzer

The Pi Hut

Tri-Color USB Controlled Tower Light with Buzzer RSS 76.50 76.50 GBP395.66 PLN
  • Sklep zagraniczny
Kod:
ADA5125
Producent:
THE PI HUT
Waluta:
funt szterling
Dodany do bazy:
Ostatnio widziany:
Zmiana ceny:
-15% (27.09.2025)
Poprzednia cena:
90.00 GBP

With this Tri-Color USB Controlled Tower Light with Buzzer, you can easily monitor and alert humanoids as to the status of a project, machine, or even if the bathroom is occupied! Unlike our other tower lights, no wiring or microcontroller programming is required. It's completely plug-and-play for use with any computer that has a USB port, even a Raspberry Pi SBC - so we recommend it when you just want to get something running and don't want to noodle around with 12V power plugs and transistors. It's also got a great adjustable-angle body and three mounting holes on the base for easy installation. The tower light is powered and controlled over USB, so just plug it right in. Inside is a microcontroller connected over a CH43x USB-to-UART chip, so you'll need to install a CH43x driver for the COM/Serial port to show up. Once the serial port is created, connect to it over 9600 baud and send command codes to turn on and off the red, yellow and green LEDs and enable/disable the buzzer. There's also a blink command, so you don't have to continuously turn on/off the LED to have a pulsing/blinking effect. See below for an example Python script that will toggle everything on/off to test. Technical Details

Dimensions:

* Overall length: 25.4cm / 10"

* Lamp diameter: 4.8cm / 1.8"

* Lamp base diameter: ~9cm / 3.5"

* USB cable length: 1.3m / ~50"

Python code example to control the lamp over USB """ Example for Adafruit USB tower light w/alarm don't forge to `pip install pyserial` or `pip3 install pyserial` """

import serial import time

serialPort = 'COM57' # Change to the serial/COM port of the tower light #serialPort = '/dev/USBserial0' # on mac/linux, it will be a /dev path baudRate = 9600

REDON = 0x11 REDOFF = 0x21 REDBLINK = 0x41

YELLOWON= 0x12 YELLOWOFF = 0x22 YELLOWBLINK = 0x42

GREENON = 0x14 GREENOFF = 0x24 GREENBLINK = 0x44

BUZZERON = 0x18 BUZZEROFF = 0x28 BUZZERBLINK = 0x48

def sendCommand(serialport, cmd):

serialport.write(bytes([cmd]))

if name == 'main':

mSerial = serial.Serial(serialPort, baudRate)

# Clean up any old state

sendCommand(mSerial, BUZZEROFF)

sendCommand(mSerial, REDOFF)

sendCommand(mSerial, YELLOWOFF)

sendCommand(mSerial, GREENOFF)

# turn on each LED set in order

sendCommand(mSerial, REDON)

time.sleep(0.5)

sendCommand(mSerial, REDOFF)

sendCommand(mSerial, YELLOWON)

time.sleep(0.5)

sendCommand(mSerial, YELLOWOFF)

sendCommand(mSerial, GREENON)

time.sleep(0.5)

sendCommand(mSerial, GREENOFF)

# beep!

sendCommand(mSerial, BUZZERON)

time.sleep(0.1)

sendCommand(mSerial, BUZZEROFF)

# Use the built-in blink modes

sendCommand(mSerial, REDBLINK)

time.sleep(3)

sendCommand(mSerial, REDOFF)

sendCommand(mSerial, YELLOWBLINK)

time.sleep(3)

sendCommand(mSerial, YELLOWOFF)

sendCommand(mSerial, GREENBLINK)

time.sleep(3)

sendCommand(mSerial, GREENOFF)

# Please be kind, re-wind!

sendCommand(mSerial, BUZZEROFF)

sendCommand(mSerial, REDOFF)

sendCommand(mSerial, YELLOWOFF)

sendCommand(mSerial, GREENOFF)

mSerial.close()

Elecena nie prowadzi sprzedaży elementów elektronicznych, ani w niej nie pośredniczy.

Produkt pochodzi z oferty sklepu