LEDstream.pde on Arduino Nano
Boblight because Adalight with Processing (very slow)
####################################################################
http://code.google.com/p/boblight/wiki/Compiling
If everything goes well..... $ make $ sudo make install
Fourth step configure boblight for your controller:
Depending on your controller you should move the correct config files to /etc under ~/boblight-read-only/arduino you will find config files for different setups.
For a arduino duemilanove,
$ sudo cp ~/boblight-read-only/arduino/duemilanove.conf /etc/boblight.conf
For a arduino MEGA,
$ sudo cp ~/boblight-read-only/arduino/mega.conf /etc/boblight.conf
Next put the arduino sketch onto your arduino. For simply a arduino MEGA or Duemilanove, open the sketch located at ~/boblight-read-only/arduino/boblight_arduino_pwm/boblight_arduino_pwm.pde in the arduino IDE.
The wiring for the arduino is as follows:
For duemilanove,
connect the first LED to pins 3,5,6 (which correspond to R,G,B). and the second LED to 9,10,11. Wire all the LED's ground to the ground on your arduino.
For MEGA,Fifth step: Testing the lights:
connect the first LED to pins 2,3,4 (which correspond to R,G,B). the second LED to pins 5,6,7. the third LED to pins 8,9,10. and the fourth LED to pins 11,12,13. Wire all the LED's ground to the ground on your arduino.
Plug your arduino into your computer's USB port and run the command:
$ boblightdTest your lights by running in another terminal:
$ boblight-constant FF0000 This should output the color RED. Kill this process and run: $ boblight-constant 00FF00 This should output the color GREEN. Kill this process and run: $ boblight-constant 0000FF This should output the color BLUE. Kill this process.
If a color wasn't output, or the wrong color was displayed you should go check the wiring of your arduino.
Depending on how your using boblight, you should run the correct boblight client. To have the colors change based on the image being displayed on the screen you should use boblight-X11.
boblight-X11 is known not to work in full screen with certain AMD Radeon cards with the closed source drivers. Some will work with the free Radeon drivers.
If you are running boblight-X11 over ssh do:
$ export DISPLAY=:0.0
To list various options for boblight-X11 you can run boblight-X11 -l and for help boblight-X11 -help
An example one could use is:Written by: jjrh
boblight-X11 -x -i 0.03 -o value=5.0 -o saturation=2.0 -o speed=60.0
Problem with Arduino Nano controller --> ln /dev/ttyUSB0 /dev/ttyS55
/etc/boblight.conf
[global]
interface 127.0.0.1
port 19333
[device]
name ambilight
type momo
output /dev/ttyS55
channels 150 #c'est le nombre de LED multiplié par 3. Dans cette exemple 75 = 25Ledx3
prefix 41 64 61 00 31 64 #50 LEDs
interval 10000
rate 115200
debug off #turn this on to see what it's doing with the serial port
delayafteropen 1000000
[color]
name red
rgb 0000FF
#rgb FF0000
adjust 0.7
gamma 1.0
[color]
name green
rgb 00FF00
adjust 1.0
gamma 1.0
[color]
name blue
rgb FF0000
#rgb 0000FF
adjust 1.0
gamma 1.0
[light]
name 1
color red ambilight 1
color green ambilight 2
color blue ambilight 3
hscan 47.08 52.97
vscan 90 100
[light]
name 2
color red ambilight 4
color green ambilight 5
color blue ambilight 6
hscan 41.2 47.08
vscan 90 100
[light]
name 3
color red ambilight 7
color green ambilight 8
color blue ambilight 9
hscan 35.31 41.19
vscan 90 100
[light]
name 4
color red ambilight 10
color green ambilight 11
color blue ambilight 12
hscan 29.43 35.31
vscan 90 100
[light]
name 5
color red ambilight 13
color green ambilight 14
color blue ambilight 15
hscan 23.54 29.42
vscan 90 100
[light]
name 6
color red ambilight 16
color green ambilight 17
color blue ambilight 18
hscan 17.66 23.54
vscan 90 100
[light]
name 7
color red ambilight 19
color green ambilight 20
color blue ambilight 21
hscan 11.77 17.65
vscan 90 100
[light]
name 8
color red ambilight 22
color green ambilight 23
color blue ambilight 24
hscan 5.89 11.77
vscan 90 100
[light]
name 9
color red ambilight 25
color green ambilight 26
color blue ambilight 27
hscan 0 5.88
vscan 90 100
[light]
name 10
color red ambilight 28
color green ambilight 29
color blue ambilight 30
hscan 0 5.88
vscan 80 90
[light]
name 11
color red ambilight 31
color green ambilight 32
color blue ambilight 33
hscan 0 5.88
vscan 70 80
[light]
name 12
color red ambilight 34
color green ambilight 35
color blue ambilight 36
hscan 0 5.88
vscan 60 70
[light]
name 13
color red ambilight 37
color green ambilight 38
color blue ambilight 39
hscan 0 5.88
vscan 50 60
[light]
name 14
color red ambilight 40
color green ambilight 41
color blue ambilight 42
hscan 0 5.88
vscan 40 50
[light]
name 15
color red ambilight 43
color green ambilight 44
color blue ambilight 45
hscan 0 5.88
vscan 30 40
[light]
name 16
color red ambilight 46
color green ambilight 47
color blue ambilight 48
hscan 0 5.88
vscan 20 30
[light]
name 17
color red ambilight 49
color green ambilight 50
color blue ambilight 51
hscan 0 5.88
vscan 10 20
[light]
name 18
color red ambilight 52
color green ambilight 53
color blue ambilight 54
hscan 0 5.88
vscan 0 10
[light]
name 19
color red ambilight 55
color green ambilight 56
color blue ambilight 57
hscan 5.88 11.76
vscan 0 10
[light]
name 20
color red ambilight 58
color green ambilight 59
color blue ambilight 60
hscan 11.76 17.65
vscan 0 10
[light]
name 21
color red ambilight 61
color green ambilight 62
color blue ambilight 63
hscan 17.65 23.53
vscan 0 10
[light]
name 22
color red ambilight 64
color green ambilight 65
color blue ambilight 66
hscan 23.53 29.41
vscan 0 10
[light]
name 23
color red ambilight 67
color green ambilight 68
color blue ambilight 69
hscan 29.41 35.29
vscan 0 10
[light]
name 24
color red ambilight 70
color green ambilight 71
color blue ambilight 72
hscan 35.29 41.18
vscan 0 10
[light]
name 25
color red ambilight 73
color green ambilight 74
color blue ambilight 75
hscan 41.18 47.06
vscan 0 10
[light]
name 26
color red ambilight 76
color green ambilight 77
color blue ambilight 78
hscan 47.06 52.94
vscan 0 10
[light]
name 27
color red ambilight 79
color green ambilight 80
color blue ambilight 81
hscan 52.94 58.82
vscan 0 10
[light]
name 28
color red ambilight 82
color green ambilight 83
color blue ambilight 84
hscan 58.82 64.71
vscan 0 10
[light]
name 29
color red ambilight 85
color green ambilight 86
color blue ambilight 87
hscan 64.71 70.59
vscan 0 10
[light]
name 30
color red ambilight 88
color green ambilight 89
color blue ambilight 90
hscan 70.59 76.47
vscan 0 10
[light]
name 31
color red ambilight 91
color green ambilight 92
color blue ambilight 93
hscan 76.47 82.35
vscan 0 10
[light]
name 32
color red ambilight 94
color green ambilight 95
color blue ambilight 96
hscan 82.35 88.23
vscan 0 10
[light]
name 33
color red ambilight 97
color green ambilight 98
color blue ambilight 99
hscan 88.23 94.12
vscan 0 10
[light]
name 34
color red ambilight 100
color green ambilight 101
color blue ambilight 102
hscan 94.12 100
vscan 0 10
[light]
name 35
color red ambilight 103
color green ambilight 104
color blue ambilight 105
hscan 94.12 100
vscan 10 20
[light]
name 36
color red ambilight 106
color green ambilight 107
color blue ambilight 108
hscan 94.12 100
vscan 20 30
[light]
name 37
color red ambilight 109
color green ambilight 110
color blue ambilight 111
hscan 94.12 100
vscan 30 40
[light]
name 38
color red ambilight 112
color green ambilight 113
color blue ambilight 114
hscan 94.12 100
vscan 40 50
[light]
name 39
color red ambilight 115
color green ambilight 116
color blue ambilight 117
hscan 94.12 100
vscan 50 60
[light]
name 40
color red ambilight 118
color green ambilight 119
color blue ambilight 120
hscan 94.12 100
vscan 60 70
[light]
name 41
color red ambilight 121
color green ambilight 122
color blue ambilight 123
hscan 94.12 100
vscan 70 80
[light]
name 42
color red ambilight 124
color green ambilight 125
color blue ambilight 126
hscan 94.12 100
vscan 80 90
[light]
name 43
color red ambilight 127
color green ambilight 128
color blue ambilight 129
hscan 94.12 100
vscan 90 100
[light]
name 44
color red ambilight 130
color green ambilight 131
color blue ambilight 132
hscan 88.24 94.12
vscan 90 100
[light]
name 45
color red ambilight 133
color green ambilight 134
color blue ambilight 135
hscan 82.35 88.24
vscan 90 100
[light]
name 46
color red ambilight 136
color green ambilight 137
color blue ambilight 138
hscan 76.47 82.35
vscan 90 100
[light]
name 47
color red ambilight 139
color green ambilight 140
color blue ambilight 141
hscan 70.59 76.47
vscan 90 100
[light]
name 48
color red ambilight 142
color green ambilight 143
color blue ambilight 144
hscan 64.71 70.59
vscan 90 100
[light]
name 49
color red ambilight 145
color green ambilight 146
color blue ambilight 147
hscan 58.82 64.71
vscan 90 100
[light]
name 50
color red ambilight 148
color green ambilight 149
color blue ambilight 150
hscan 52.94 58.82
vscan 90 100
----------------------------------------------------------------------------
Test:
terminal 1: boblightd
terminal 2: boblight-X11
######################################################################
Keine Kommentare:
Kommentar veröffentlichen