...that deal with pure data
You are not logged in.
Hello everybody,
first, sorry if my English is not always correct, I try to do my best ... :)
I'm doing a project with an Arduino Mega 2560 with 16 proximity sensors, I have 16 LEDs that light up depending on the intensity of each sensor.
The problem is that on my arduino mega I only have 13 outputs digital "PWM", how to get more?
I searched google and I found it (it use i2c with an arduino master and a slave):
http://www.youtube.com/watch?v=FiDaNkuw … ure=relmfu
I have a second arduino uno so I tried to connect them (current flows), my problem is I can not send data to a second digital PWM outputs ...
What I do is it possible or not? (knowing that I already use the PWM output of my arduino mega) if yes how can i do?
if somebody know other solutions to get more out "PWM"...?
Here is the patch that I use and I changed, and I want to thank the people who created this patch!
Last edited by silas202 (2012-01-22 19:18:08)
Offline
Have a look to the TLC5940, it has 16 PWM outputs and you can control it with 3 pins if i remember well.
Offline
@dwan thank you dawn, i've just bought one, i will receive it in 2 days,
i have read some explanation on how to connect the TLC5940 but i don't understand how can i control all my 16 led by the way of just 5 digital "pwm" on my arduino mega? what i have to change in my sketch? i have to make a bridge between my array of pin and a new one or something like that?
thanks for your response
Offline
see here, there is an arduino library : http://www.arduino.cc/playground/Learning/TLC5940
Offline
hello dwan (and others :) ),
i've just received my tlc5940 and it work with the basic use in arduino IDE,
now i need to control my leds with pure data, i've uploaded standard firmata with library ( #include <Tlc5940.h>), but with my sketch (in my previous post) i don't understand what can i change to control my led?
and i've find this patch... i don't know if it can help?
thank you to response
Offline
IMHO, you cannot drive the TLC from puredata only. You have to write some function in the arduino that receives orders from puredata and then speaks to the TLC.
For example, you could send [1 128< and the arduino would interpret it as "set the first PWM output to a duty cycle of 128". Now you just have to translate from pd to arduino :) It should be easy if you read the library's documentation
Oh, and the patch you posted won't be of any help.
Last edited by dwan (2012-01-24 19:23:16)
Offline