Go to advanced search

by Ph1lj2
Mon Jul 08, 2013 4:17 pm
Forum: Automation, sensing and robotics
Topic: How to Auto start a python script that uses GPIO tx/rx pins
Replies: 12
Views: 27953

Re: How to Auto start a python script that uses GPIO tx/rx p

Hi all # Greenhouse service description "Greenhouse service" author "User" start on runlevel [2345] stop on runlevel [016] chdir /home/pi/ exec python /home/pi/grnhouse3.py respawn So this is my conf file named as gogh.conf, located in the /ect/init/ folder, to test it I ran sudo service gogh start ...
by Ph1lj2
Fri Jul 05, 2013 6:49 pm
Forum: Automation, sensing and robotics
Topic: How to Auto start a python script that uses GPIO tx/rx pins
Replies: 12
Views: 27953

How to Auto start a python script that uses GPIO tx/rx pins

Hi Can someone please help, written a script that sends out data using the GPIO tx/rx pins - when I start the script from a terminal all is well, my serial device see's the data :D So the next step was to auto-start the same script, in other words automatically run the script on power-up. - that see...
by Ph1lj2
Fri Jun 28, 2013 8:58 pm
Forum: Python
Topic: Running two GPIO python scripts at once
Replies: 19
Views: 17321

Re: Running two GPIO python scripts at once

Thanks for your suggestion

Just tried that and no joy

boy this is frustrating :twisted:
by Ph1lj2
Fri Jun 28, 2013 8:31 pm
Forum: Python
Topic: Running two GPIO python scripts at once
Replies: 19
Views: 17321

Re: Running two GPIO python scripts at once

cae2100 You mentioned that you were using the serial port to send data to a Pic, are you using the GPIO pins and by chance do you autostart your script on reboot ? I ask cause I've written a script that does use the GPIO Rx/Tx pins, if I start the script from a terminal sudo python go.py everything ...
by Ph1lj2
Mon Jun 17, 2013 12:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Problem with P1 tx/rx pins
Replies: 0
Views: 422

Problem with P1 tx/rx pins

Hi All I'll try to clarify my problem. Basically I have written a small script that controls some GPIO and transfers some data out through the tx/rx (P1 14/15). All works well if I allow the RPi to boot then I run the script from a terminal like this :- sudo python go.py The transmitted data is rece...
by Ph1lj2
Mon Jun 17, 2013 12:15 pm
Forum: Automation, sensing and robotics
Topic: Problem using Tx Rx pins after auto start
Replies: 4
Views: 957

Re: Problem using Tx Rx pins after auto start - AGAIN

Hi All Thanks for your tips unfortunately my problem still exists, I'll try to clarify my problem further. Basically I have written a small script that controls some GPIO and transfers some data out through the tx/rx (P1 14/15). All works well if I allow the RPi to boot then I run the script from a ...
by Ph1lj2
Fri Jun 14, 2013 8:13 pm
Forum: Automation, sensing and robotics
Topic: Problem using Tx Rx pins after auto start
Replies: 4
Views: 957

Problem using Tx Rx pins after auto start

Has anyone any idea why I can not use the P1 tx/rx pins after my python script runs automatically on boot. If I restart the script using sudo python go.py for example, all is well. I autostart the script from the following /home/pi/.config/lxsession/LXDE/autostart which has sudo /home/pi/python go.p...
by Ph1lj2
Thu Jun 13, 2013 2:40 pm
Forum: Other projects
Topic: OpenPLC and Graphical Programming with Rasberry PI
Replies: 28
Views: 39759

Re: OpenPLC and Graphical Programming with Rasberry PI

0x17 Hi I have just tried to install EsPeEs, using the install instruction on bitbucket. Maybe it's me but after executing the 6 sudo instructions, using the either-version I get back -bash: cd: /path/to/espess_v0.1/: No such file or directory after executing the cd /path/to/espess_v0.1 as in line 1...
by Ph1lj2
Wed Feb 13, 2013 1:26 pm
Forum: Other programming languages
Topic: Detecting a button press with Lazarus
Replies: 12
Views: 2749

Re: Detecting a button press with Lazarus

I zipped up a copy of my project and put it at http://www.kymark.com/laz-gpio-test.tar.gz. I was not able to attach it to this post for some reason. In any case, I hope it helps and let me know if you have any questions. I am by no means an expert but I have spent a lot of time trying to make it wo...
by Ph1lj2
Tue Feb 12, 2013 5:50 pm
Forum: Other programming languages
Topic: Detecting a button press with Lazarus
Replies: 12
Views: 2749

Re: Detecting a button press with Lazarus

I finally got it! I realized I was using a wrapper for a very old version of wiringPi. I ran the wiringPi.h file through the h2pas tool and replaced the wrapper I was using with the generated file. After a few tweaks and some judicious commenting out of lines that would not compile, it works!!! (ye...
by Ph1lj2
Tue Feb 05, 2013 6:26 pm
Forum: Other
Topic: Lazarus and wiringPi
Replies: 20
Views: 6548

Re: Lazarus and wiringPi

Where can I find an example ?

Been looking all over the place - no joy.

I have got the sample that uses fps - but I want have a play with the wiringPi example

Any ideas

cheers
by Ph1lj2
Wed Jan 30, 2013 2:50 pm
Forum: Python
Topic: LX Terminal, may be a silly question but ...
Replies: 1
Views: 583

LX Terminal, may be a silly question but ...

I have a small python script, that uses GPIO, gnuplot to plot various values from analogue devices, every now and then the script will close for no apparent reason, I'm wondering if it's because I print out stuff to the LX terminal every 5 seconds, does anyone now if there is a limit to the number o...
by Ph1lj2
Mon Jan 07, 2013 5:28 pm
Forum: General programming discussion
Topic: Question about autostart program in LXDE
Replies: 8
Views: 17298

Re: Question about autostart program in LXDE

Hi everybody, I wrote a python script using Tkinter and GPIO, so far it works fine. I hope to start it in a more simple way: Just connect power, RaspberryPi will boot, start LXDE and run my python script automatically. But I have no idea how to start python script with sudo(or run as root , because...
by Ph1lj2
Fri Jan 04, 2013 3:43 pm
Forum: General programming discussion
Topic: Question about autostart program in LXDE
Replies: 8
Views: 17298

Re: Question about autostart program in LXDE

Hi everybody, I wrote a python script using Tkinter and GPIO, so far it works fine. I hope to start it in a more simple way: Just connect power, RaspberryPi will boot, start LXDE and run my python script automatically. But I have no idea how to start python script with sudo(or run as root , because...
by Ph1lj2
Wed Jan 02, 2013 9:06 pm
Forum: General discussion
Topic: Which (if any) GPIO pins can trigger a hardware interrupt?
Replies: 4
Views: 998

Re: Which (if any) GPIO pins can trigger a hardware interrup

Did you have any success implementing this ? - if so would it be possible to share.
I've tried a couple of times now using python and no luck
by Ph1lj2
Thu Dec 13, 2012 1:19 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

Hi
Is it possible to run espruino at a higher baudrate ? - if I set it to say 38400 the received data is meaningless - only seems to be valid at 9600
by Ph1lj2
Wed Dec 12, 2012 4:01 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

hi With respect to the F4 version, it appears that I am unable to read any Analog port that does not have the description 'ADC123_IN*' as found in the stm32F4discovery (Doc ID 022256 Rev 2) can you confirm this ? Also I've noticed that after a short while (approx 3m) of executing the python script, ...
by Ph1lj2
Wed Dec 12, 2012 1:47 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

That looks good. You don't actually need a print around the analogWrite as it doesn't return a value. It doesn't hurt though. Unfortunately I haven't implemented DAC support yet - when you use analogWrite it outputs using PWM - which may confuse your volt meter unless you filter the signal with a c...
by Ph1lj2
Tue Dec 11, 2012 10:09 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

Think I've removed the rogue characters - can you tell me if I'm using the following correctly

print espruino_cmd("print(analogWrite(A4,0.5))") - I was expecting to see a voltage of 2.5v on DAC 1

I only see a constant 5v on STM32F4

I switched to IDLE - all seems good
by Ph1lj2
Tue Dec 11, 2012 8:36 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

I'm not quite sure why that would be - but looking at it, the indentation had got broken anyway. I've updated it and I can now copy and paste it off the website into a file here and it works. You could always try the code that got pasted into an earlier forum post here: http://www.raspberrypi.org/p...
by Ph1lj2
Tue Dec 11, 2012 7:55 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

OK - so heres my latest problem, I tried to execute your sample python code and get the following error File "Analog1.py", line 8 Syntax error: Non-ASCII character '\xc2' in file Analog1.py on line 8, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details I simply cut & p...
by Ph1lj2
Tue Dec 11, 2012 7:01 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

Ok - got it up and running I think - just one thing digitalWrite("C9",1) do not appear to tun on the led, if I press the black switch however I do get the logo I'm connected to a F4 board OK found it in the STM32F4 complete manual you probably already know but LD3 = PD13 LD4 = PD12 LD5 = PD14 LD6 =...
by Ph1lj2
Tue Dec 11, 2012 5:20 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

Hi so my board (F4) has arrived - I downloaded the Window version of ST-link to download the Espruino to my board and I can not find the bin files that is suggested - here's what I have stm32f05xLoader.bin stm32f10xGLoader.bin stm32f10xLoader.bin stm32F20xLoader.bin stm32l15xLoader.bin stm32wLoader....
by Ph1lj2
Fri Dec 07, 2012 9:38 pm
Forum: HATs and other add-ons
Topic: 50 extra IO (16 analogs) for £8
Replies: 63
Views: 15691

Re: 50 extra IO (16 analogs) for £8

Cool - thanks a lot, cant wait for the board to arrive

Go to advanced search