Light Driver programming with Arduino

07.01.2017 00:07
#1 Light Driver programming with Arduino
gu

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


 Antworten

 Beitrag melden
26.02.2017 12:33 (zuletzt bearbeitet: 26.02.2017 12:34)
#2 RE: Light Driver programming with Arduino
avatar

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


 Antworten

 Beitrag melden
Bereits Mitglied?
Jetzt anmelden!
Mitglied werden?
Jetzt registrieren!
Forenspende
Hallo !

Wir hoffen, dass dir unser Forum gefällt und du dich hier genauso wohlfühlst wie wir.

Wenn du uns bei der Erhaltung des Forums unterstützen möchtest, kannst du mit Hilfe einer kleinen Spende dazu beitragen, den weiteren Betrieb zu finanzieren.

Deine Spende hilft!

Spendenziel: 346€
104%