Sie sind vermutlich noch nicht im Forum angemeldet - Klicken Sie hier um sich kostenlos anzumelden Impressum 
Sie können sich hier anmelden
Dieses Thema hat 1 Antworten
und wurde 756 mal aufgerufen
 Projekte
gunslinger Offline



Beiträge: 1

07.01.2017 00:07
Light Driver programming with Arduino Antworten

Hello everybody,

It's my first topics about mikromodelling and I would like to programming light driver with Attiny15 or Attiny85.
(5 or 4 leds)

My question is am I program with push button code for led or without.

Do you know any program code or recommend?

Thank you
Kaan


hendrik.s Offline




Beiträge: 704

26.02.2017 12:33
#2 RE: Light Driver programming with Arduino Antworten

Hi Kaan,

if you like to control the Attiny with a receiver, you don't need the function "push button" from the arduino library. The function "push button" from the arduino library only shows you, if a connected button is pushed or not. So the function returns a one (while button is pushed) or a zero (while button is not pushed). For controlling the microcontroller with a radio controlled receiver, it is necessary to encode the pulse-width-signal (PWM), which is generated from the receiver.
Try to measure the pulse by using a timer. Start measuring at the rising edge and stop the timer or read back the timer value at the falling edge.

regards

Hendrik

Youtube: https://www.youtube.com/user/stochend


 Sprung  

disconnected Mikromodell-Chat Mitglieder Online 3
Xobor Xobor Community Software
Datenschutz