Difference between revisions of "LCD + 3FETs demonstration"

From BitWizard Wiki
Jump to navigation Jump to search
(Created page with "This page describes the demo that can be found on the following youtube link: http://www.youtube.com/watch?v=enJEksPqWqo = Things we used = * [http://www.bitwizard.nl/catalo...")
 
Line 3: Line 3:
= Things we used =
= Things we used =


* [http://www.bitwizard.nl/catalog/product_info.php?products_id=69 RPi Serial Breakout board]
* [http://www.bitwizard.nl/shop/breakout-boards/dio-breakout-board RPi Serial Breakout board]
* [http://www.bitwizard.nl/catalog/product_info.php?products_id=90 SPI cable]
* [www.bitwizard.nl/shop/6-pin-idc-cable-15cm SPI cable]
* [http://www.bitwizard.nl/catalog/product_info.php?products_id=89 SPI LCD]
* [www.bitwizard.nl/shop/lcd-interface-16x2 SPI LCD]
* [http://www.bitwizard.nl/catalog/product_info.php?products_id=72 SPI 3FETs]
* [http://www.bitwizard.nl/shop/3fets SPI 3FETs]
* Common-Anode RGB LED strip
* Common-Anode RGB LED strip
* 12V Power supply
* 12V Power supply

Revision as of 16:25, 4 December 2015

This page describes the demo that can be found on the following youtube link: http://www.youtube.com/watch?v=enJEksPqWqo

Things we used

  • RPi Serial Breakout board
  • [www.bitwizard.nl/shop/6-pin-idc-cable-15cm SPI cable]
  • [www.bitwizard.nl/shop/lcd-interface-16x2 SPI LCD]
  • SPI 3FETs
  • Common-Anode RGB LED strip
  • 12V Power supply

Steps to take

Since we want to display different texts on two daisy-chained display's, we needed to change the address of one of the display's:

  • Only connect the display who's address you want to chacnge, to the SPI0 port of your RPi
  • Execute the following command: "sudo ./bw_lcd -a 82 -r 240 -v 128

Now this display should be listening on port 80.

Now connect al the SPI modules in one chain, hook up the power supply and LED strip to the 3FETs board, and run the following script as root:

#!/bin/sh

./bw_lcd -a 80 -C
./bw_lcd -a 82 -C

# Print welcome message to LCDs
./bw_lcd -a 80 -T 0,0 'Raspberry Pi'
./bw_lcd -a 80 -T 0,1 'controlling two'
./bw_lcd -a 82 -T 0,0 'LCD modules and'
./bw_lcd -a 82 -T 0,1 'an RGB LED strip'

#Enable PWM on 3FETs board
./bw_lcd -a 8A -r 95 -v 7

sleep 2

#Play with colors
./bw_lcd -a 80 -C
./bw_lcd -a 82 -C

./bw_lcd -a 80 -T 0,0 "Let's try some"
./bw_lcd -a 80 -T 0,1 'simple colors'
 
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'Red'
./bw_lcd -a 8A -r 82 -v 255
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'Yellow'
./bw_lcd -a 8A -r 81 -v 255
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'Green'
./bw_lcd -a 8A -r 82 -v 0
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'Cyan'
./bw_lcd -a 8A -r 80 -v 255
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'White'
./bw_lcd -a 8A -r 82 -v 255
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'Violet'
./bw_lcd -a 8A -r 81 -v 0
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 'Blue'
./bw_lcd -a 8A -r 82 -v 0
sleep 1
./bw_lcd -a 82 -C
./bw_lcd -a 82 -T 0,0 
./bw_lcd -a 8A -r 80 -v 0
sleep 1

./bw_lcd -a 80 -C
./bw_lcd -a 82 -C


./bw_lcd -a 80 -T 0,0 'Nice, eh?'