stari Active Member Licensed User Longtime User Jun 15, 2014 #1 Hello, anybody knows, how to produce 2 Hz square wave pulses ? I need pulses for switching LEd on and OFF , in rhitmus 2 Hz.
Hello, anybody knows, how to produce 2 Hz square wave pulses ? I need pulses for switching LEd on and OFF , in rhitmus 2 Hz.
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2014 #2 Use a timer to change the value from 1 to 0 every 0.5 second. Upvote 0
stari Active Member Licensed User Longtime User Jun 16, 2014 #3 Erel said: Use a timer to change the value from 1 to 0 every 0.5 second. Click to expand... Erel, thks. I know that. But, how can i switch , for example, an LED On/OFF without additional hardware ? Can i switch, for example, USB power pin ON/OFF ? Upvote 0
Erel said: Use a timer to change the value from 1 to 0 every 0.5 second. Click to expand... Erel, thks. I know that. But, how can i switch , for example, an LED On/OFF without additional hardware ? Can i switch, for example, USB power pin ON/OFF ?
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2014 #4 This is more difficult. You can use a Usb to serial converter and then use it to control a LED (see UsbSerial library). Upvote 0
This is more difficult. You can use a Usb to serial converter and then use it to control a LED (see UsbSerial library).
F fatman Active Member Licensed User Longtime User Jun 16, 2014 #5 Without additional hardware you may use the internal flash: http://www.b4x.com/android/forum/threads/flashlight-app.11664/ Fatman Upvote 0
Without additional hardware you may use the internal flash: http://www.b4x.com/android/forum/threads/flashlight-app.11664/ Fatman
stari Active Member Licensed User Longtime User Jun 16, 2014 #6 fatman said: Without additional hardware you may use the internal flash: http://www.b4x.com/android/forum/threads/flashlight-app.11664/ Fatman Click to expand... Fatman, thank you. this solution is known by me. But, ..., i wish to turn on/off an external LED. Mybe over audio port? Or USB - eg. switching USB power pin on/off ? Is this possible ? Thank you. Upvote 0
fatman said: Without additional hardware you may use the internal flash: http://www.b4x.com/android/forum/threads/flashlight-app.11664/ Fatman Click to expand... Fatman, thank you. this solution is known by me. But, ..., i wish to turn on/off an external LED. Mybe over audio port? Or USB - eg. switching USB power pin on/off ? Is this possible ? Thank you.
stevel05 Expert Licensed User Longtime User Jun 16, 2014 #7 Have a look at this, and go with Erel's answer: http://stackoverflow.com/questions/1925237/control-usb-ports-power Upvote 0
Have a look at this, and go with Erel's answer: http://stackoverflow.com/questions/1925237/control-usb-ports-power
S strat Active Member Licensed User Longtime User Jun 16, 2014 #8 By using audio output, you can drive a transistor to flashing a led. Simple BJT circuit can easily turn on a 20 mA small led. Upvote 0
By using audio output, you can drive a transistor to flashing a led. Simple BJT circuit can easily turn on a 20 mA small led.
Michael Gasperi Member Licensed User Longtime User Jun 16, 2014 #9 The peak audio output is about 1/2V which is too low for an LED by itself. Strat's idea is a good one if you have an external power source. You might be able to use an audio output transformer backwards (for example Radio Shack 273-1380) to kick up the voltage to something an LED would need. Upvote 0
The peak audio output is about 1/2V which is too low for an LED by itself. Strat's idea is a good one if you have an external power source. You might be able to use an audio output transformer backwards (for example Radio Shack 273-1380) to kick up the voltage to something an LED would need.
stari Active Member Licensed User Longtime User Jun 17, 2014 #10 stevel05 said: Have a look at this, and go with Erel's answer: http://stackoverflow.com/questions/1925237/control-usb-ports-power Click to expand... ok, i will try. Upvote 0
stevel05 said: Have a look at this, and go with Erel's answer: http://stackoverflow.com/questions/1925237/control-usb-ports-power Click to expand... ok, i will try.
stari Active Member Licensed User Longtime User Jun 17, 2014 #11 Michael Gasperi said: The peak audio output is about 1/2V which is too low for an LED by itself. Strat's idea is a good one if you have an external power source. You might be able to use an audio output transformer backwards (for example Radio Shack 273-1380) to kick up the voltage to something an LED would need. Click to expand... I don't have an external sourc, or i don't wish to use it. Transformer will be Ok, i will try. Upvote 0
Michael Gasperi said: The peak audio output is about 1/2V which is too low for an LED by itself. Strat's idea is a good one if you have an external power source. You might be able to use an audio output transformer backwards (for example Radio Shack 273-1380) to kick up the voltage to something an LED would need. Click to expand... I don't have an external sourc, or i don't wish to use it. Transformer will be Ok, i will try.