-
Notifications
You must be signed in to change notification settings - Fork 53
/
play.sh
executable file
·44 lines (38 loc) · 1.22 KB
/
play.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Beaglebone - Backlight works, but display doesn't
BUS=2
DISPLAY_RGB_ADDR=0x62
DISPLAY_TEXT_ADDR=0x3e
# i2cdump -y $BUS $DISPLAY_RGB_ADDR
# i2cget -y $BUS $DISPLAY_RGB_ADDR 0
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x3a
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x0f
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x01
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x07
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x01
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x02
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x07
sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x0f
sleep 0.05
# i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x01 # Clear display
# sleep 0.05
# i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x04 # display on, no cursor
# sleep 0.05
# i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x80 0x28 # 2 lines
# sleep 0.05
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x40 0xe1
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x40 0x62
i2cset -y $BUS $DISPLAY_TEXT_ADDR 0x40 0x42
i2cset -y $BUS $DISPLAY_RGB_ADDR 0 0
i2cset -y $BUS $DISPLAY_RGB_ADDR 1 0
i2cset -y $BUS $DISPLAY_RGB_ADDR 0x08 0xaa
i2cset -y $BUS $DISPLAY_RGB_ADDR 4 0 # R
i2cset -y $BUS $DISPLAY_RGB_ADDR 3 128 # G
i2cset -y $BUS $DISPLAY_RGB_ADDR 2 0 # B