Go to advanced search

by Ferdinand
Mon Dec 12, 2016 7:17 pm
Forum: Automation, sensing and robotics
Topic: Solenoid wiring (did I do it right?)
Replies: 15
Views: 3626

Re: Solenoid wiring (did I do it right?)

WARNING The solenoid in your link is meant for (dc) battery operated irrigation controllers (9V). It is not a ac solenoid. This solenoid should work with your mosfet without problems. I think you made a mistake how this solenoid operates. Use a H bridge to latch and unlatch your solenoid by swappin...
by Ferdinand
Mon Dec 12, 2016 1:03 pm
Forum: Automation, sensing and robotics
Topic: Solenoid wiring (did I do it right?)
Replies: 15
Views: 3626

Re: Solenoid wiring (did I do it right?)

Hi equals, Do you have an ohmmeter to measure the coil resistance? You may also measure the dc current through your relay. I except that the dc current is much higher then 0.14 amp which is an ac value. The resistance value specified is a ac impedance, dc coil resistance is much lower. That could ex...
by Ferdinand
Sun Dec 11, 2016 7:54 am
Forum: Troubleshooting
Topic: LDR readout not working properly on RPI 3
Replies: 5
Views: 2110

Re: LDR readout not working properly on RPI 3

Hi Florisjan, Some remarks: The swap of high/low in line 11/16 was because I used a two way (no +/-) capacitor, allowing me to charge it and read it out with the same gpio, so a 3.3v wire is not necessary. You may use both methods with electrolytic/ceramic capacitors. One side of the capacitor is al...
by Ferdinand
Sat Dec 10, 2016 8:28 am
Forum: Troubleshooting
Topic: LDR readout not working properly on RPI 3
Replies: 5
Views: 2110

Re: LDR readout not working properly on RPI 3

Hi Florisjan, I'm very sorry to say but you did not post your latest py script because this script will never run. You have made a couple of mistakes: 1) ":" is missing in line 16 2) It is try and except (you need both). Remove try statement and adjust indentation in succeeding lines, see below 3) i...
by Ferdinand
Fri Dec 09, 2016 12:51 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 7858

Re: Run Python Script at Startup

frankenberry wrote: I now have a working script. Although, I do not understand why it works...
NCLAB has a very good ebook "Introduction to Python Programming"
and re(read) the excellent cronHOWTO post of RaTTus.
by Ferdinand
Thu Dec 08, 2016 1:01 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 7858

Re: Run Python Script at Startup

RaTTuS wrote: crontab -e
* */4 * * * /path/to/python /path/to/script arguments >/tmp/redirection.ouput.file
It's 0 */4 * * * /path/to ...
Otherwise 60 extra lines will be made in an outputfile.
I tested it.
by Ferdinand
Thu Dec 08, 2016 7:11 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 7858

Re: Run Python Script at Startup

Hi frankenberry, Use crontab -e to edit your pi crontab: @reboot /usr/bin/python /home/pi/CronJobs/testPython.py >> /home/pi/time.txt 0 */4 * * * /usr/bin/python /home/pi/CronJobs/testPython.py >> /home/pi/time.txt This will add/create a line in time.txt directly after a reboot and add a line every ...
by Ferdinand
Sat Dec 03, 2016 9:36 am
Forum: Troubleshooting
Topic: GPIO not working as expected
Replies: 10
Views: 2159

Re: GPIO not working as expected

Hi radenblazed, Don't connect these level shifters directly to your relay channels, it could fry your pi! A relay channel current is 15 to 20 mA. See your sainsmart datasheet. A gpio port can sink/source about 16 mA max. If you activate more then 3 relays, 45 - 60 mA total, your are exceeding the ma...
by Ferdinand
Wed Nov 30, 2016 9:36 pm
Forum: Python
Topic: anyone willing to help me write a python script
Replies: 2
Views: 815

Re: anyone willing to help me write a python script

Hi fusionwerks, Try this code: #!/usr/bin/python import time import RPi.GPIO as GPIO import sys # Hex characters 0..9,A..F # x = pause hex_string="0123x456789ABCDEFxxxABC" time_delay = 0.5 time_delay_x = 0.5 relay_pin = [2,3,4,17,27,22,20,9,11,5,6,13,19,26,21,20] GPIO.setwarnings(False) GPIO.setmode...
by Ferdinand
Thu Nov 24, 2016 5:22 pm
Forum: General discussion
Topic: Running file
Replies: 3
Views: 657

Re: Running file

Hi bdrmachine,

Your first line in install.sh must be:
#!/bin/bash
then
chmod 700 install.sh
then
./install.sh
by Ferdinand
Sat Nov 19, 2016 4:33 pm
Forum: General discussion
Topic: Stepper Motors and the L293D
Replies: 12
Views: 2968

Re: Stepper Motors and the L293D

Hi AidanTek, The coil current, in this case, is about 1.4 Amp (typical specs of L298). However, the power dissipation (L298) is about 4.6 W for 1 stepper motor. If both motors are running then the max. dissipation is 9.2 W. The conclusion is that you need to mount the L298 bridge on a well designed ...
by Ferdinand
Thu Nov 17, 2016 3:52 pm
Forum: General discussion
Topic: Stepper Motors and the L293D
Replies: 12
Views: 2968

Re: Stepper Motors and the L293D

Hi AidanTek,

Which stepper motor are you using?

Perhaps this link can provide you more info:
viewtopic.php?f=63&t=157745
by Ferdinand
Thu Nov 17, 2016 10:17 am
Forum: General discussion
Topic: command not running in rc.local but works in terminal
Replies: 9
Views: 2919

Re: command not running in rc.local but works in terminal

Hi eaglehack, I did some tests. My python program runs fine after a reboot (flashing a led). A couple of options: 1) create a new account/profile with sudo rights and remove "pi" account/profile. Don't forget to make a backup of important files! or 2) Maybe your system has been corrupted for some re...
by Ferdinand
Mon Nov 14, 2016 7:08 pm
Forum: Python
Topic: Help with Python code
Replies: 16
Views: 2194

Re: Help with Python code

Hi willbobby, I modified your program a little bit. I put a random function in it. Success with your program, nice example!!! #!/usr/bin/python # author : willbobby # raspberry pi forum : Help with Python code # date : Nov 12, 2016 import random import os import time loop = True while loop: os.syste...
by Ferdinand
Sun Nov 13, 2016 6:41 pm
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Graag gedaan.
Succes!
by Ferdinand
Sat Nov 12, 2016 2:24 pm
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Hallo fnuus, Ik heb een paar kleine aanpassingen gemaakt. De timers hebben nu een vaste tijd die je bovenaan, in het script, kan aanpassen. De namen zijn: t_aan_red = 1 en t_aan_yellow = 0.2 Verder heb ik wat commentaar toegevoegd. De rode leds knipperen met een vaste tijd van 1 sec De gele leds kni...
by Ferdinand
Sat Nov 12, 2016 11:01 am
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Ha fnuus,

Ik ga ermee aan de slag.
by Ferdinand
Sat Nov 12, 2016 9:47 am
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Hallo fnuus, Hoe heb jij de leds aangesloten? Manier 1) 3.3 V ----REDLED----weerstand----pin x of manier 2 pin x -----REDLED------weerstand---GND x stelt hier pin 31,33,35 of 37 voor. Ik heb in de software manier 1 gebruikt. Wanneer jij manier 2 gebruikt moet je dat in de software wijzigen. Pin 37 w...
by Ferdinand
Fri Nov 11, 2016 4:15 pm
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Hi fnuus, Ik heb jouw programma een beetje aangepast en gebruik gemaakt van de gegevens uit jouw eerste post. De leds heb ik verplaatst naar de pinnen 31,33,35 en37 omdat de pinnen die jij opgaf in gebruik zijn bij het os. Gebruik bij voorkeur vrije pinnen. Ik hoop dat je hier wat aan hebt en anders...
by Ferdinand
Thu Nov 10, 2016 3:31 pm
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Hallo Naaamgenoot, Je geeft bij de start van het programma aan flash_yellow = True Dan een if statement waarin flash_yellow wordt getest Wanneer dat waar is dan 15 x knipperen Na 15x knipperen geef je aan flash_yellow = False De gele leds knipperen dan niet meer bij de volgende doorgang. Dan: functi...
by Ferdinand
Thu Nov 10, 2016 2:19 pm
Forum: Nederlands
Topic: Led loop maken
Replies: 13
Views: 2062

Re: Led loop maken

Hallo fnuus, Het beste om hier functies in te zetten. Functie 1) 2 rode leds die 50 x knipperen Functie 2) Gele led aan, 10 sec. wachten en dan gele led uit Functie 3) Rode leds aan die zoveel x moeten knipperen. Is nu het programma afgelopen of draait het soms in een loop? In een functie aanroep ka...
by Ferdinand
Wed Oct 12, 2016 3:42 pm
Forum: Beginners
Topic: Shutdown after set period
Replies: 4
Views: 852

Re: Shutdown after set period

Hi,
try this command on a testimage!!!
Use the following command to edit the root crontab:
sudo crontab -e
add the following line to your crontab.

Code: Select all

@reboot sleep 60;/sbin/shutdown +120
don't forget the sleep command, otherwise you will have a login problem!!!
by Ferdinand
Wed Oct 12, 2016 11:38 am
Forum: Beginners
Topic: Shutdown after set period
Replies: 4
Views: 852

Re: Shutdown after set period

Hi,

Follow this link:
http://pcsupport.about.com/od/commandli ... ommand.htm

Than create a script to start the shutdown command at after rebooting.
Follow the discussion on the pi-forum.
by Ferdinand
Tue Sep 27, 2016 2:48 pm
Forum: Troubleshooting
Topic: Synaptic Package Manager - no background
Replies: 4
Views: 1074

Re: Synaptic Package Manager - no background

Hi mojorizing,

The profile of synaptic has been corrupted for some reason.
Remove 'as root' the .synaptic file in the folder /root
The easiest way to remove this file is by using midnight commander (mc).
sudo apt-get install mc
Reboot your system after modification.
by Ferdinand
Tue Sep 27, 2016 1:06 pm
Forum: Troubleshooting
Topic: Raspberry Pi not running crontab script on startup
Replies: 8
Views: 5424

Re: Raspberry Pi not running crontab script on startup

Great news, next challenge!!! :?:

Go to advanced search