Go to advanced search

by MarkDH102
Fri Sep 23, 2016 12:11 pm
Forum: Python
Topic: On powerup, I have 2 copies of my python app running
Replies: 5
Views: 1038

On powerup, I have 2 copies of my python app running

I use sudo nano ~/.config/lxsession/LXDE-pi/autostart and add @/usr/bin/python3 /home/pi/hamstead/hamstead.py hamstead.py uses serial comms to an Arduino over USB It is fairly obvious that two copies are running simultaneously from what I'm seeing on the Arduino. (and in taskmanager) Is this somethi...
by MarkDH102
Tue Aug 23, 2016 2:13 pm
Forum: Beginners
Topic: [SOLVED]12v UPS DIY circuit attiny85 lm317
Replies: 67
Views: 21578

Re: 12v UPS DIY Help

I've been using the RavPower in the post below as a UPS for the last 4 weeks now...

viewtopic.php?f=63&t=143147&p=1027917#p1027917
by MarkDH102
Tue Aug 23, 2016 2:10 pm
Forum: General discussion
Topic: ARRGGH Power cuts.
Replies: 28
Views: 6923

Re: ARRGGH Power cuts.

I've been using the RavPower mentioned above in situ for 4 weeks now. I've had a few short power cuts in that time and have pulled the mains adapter out occasionally with no problems. I'm drawing about 230mA fairly constantly. When we get a power cut, Western Power toggles the power a few times in a...
by MarkDH102
Sat Jul 16, 2016 2:57 pm
Forum: General discussion
Topic: ARRGGH Power cuts.
Replies: 28
Views: 6923

Re: ARRGGH Power cuts.

On Amazon Prime day last week I pulled the trigger on a RavPower 16750mAh power pack for £14.99. At last - what seems to be a useable UPS type solution. My Model B V1.1 with an Edimax WiFi adapter draws approx. 300mA. I plug the pack into the mains via a standard 2A USB phone adapter with a standard...
by MarkDH102
Sun Jul 10, 2016 9:14 am
Forum: Python
Topic: val error / sring error [IndentationError:unexpectet indent]
Replies: 2
Views: 716

Re: val error / sring error [IndentationError:unexpectet ind

You need to line up code in Python so the 3 lines under print("Motion") need to be indented to the same number of tabs or spaces Hope this helps... if GPIO.input(PIR): print("Motion detected! ") valDate = str(datetime.now()) raspistill -vf -hf -o /home/administrateur/PI3/camera/PicCAM_$ValDate.jpg t...
by MarkDH102
Mon Jun 20, 2016 3:49 pm
Forum: General discussion
Topic: Setting up a rpi3 for automated API checking
Replies: 1
Views: 471

Re: Setting up a rpi3 for automated API checking

You could try this method, it's for python, but I guess the path just needs changing for Ruby? I'm no expert though..

viewtopic.php?f=31&t=43509&p=900527#p900527
by MarkDH102
Fri May 27, 2016 12:43 pm
Forum: Python
Topic: trying to use raspivid and popen
Replies: 3
Views: 773

Re: trying to use raspivid and popen

Many thanks...worked fine. I'm still learning...
by MarkDH102
Fri May 27, 2016 12:03 pm
Forum: Python
Topic: trying to use raspivid and popen
Replies: 3
Views: 773

trying to use raspivid and popen

Ok guys, what am I doing wrong? processID = Popen(["raspivid", "-o /home/pi/TEST.h264", "-t 20000", "-c", "-s"]) raspivid executes and throws up invalid command line option ( -o /home/pi/TEST.h264 ) I am using the latest Jessie on a Model A. If I run from the command line it works fine... I do find ...
by MarkDH102
Sat May 07, 2016 4:13 pm
Forum: Python
Topic: Serial port code worked in Python 2 but not 3
Replies: 3
Views: 942

Re: Serial port code worked in Python 2 but not 3

It was a combination of things. 1: b'\0x00' IS NOT THE SAME AS b'\x00' 2: I opened the serial port at 9600, sent a message to my device to tell it to switch to 115200 then closed the port. In python 2 this worked. In python 3 closing the port prevented some characters being sent out hence my device ...
by MarkDH102
Fri May 06, 2016 7:26 pm
Forum: Python
Topic: Serial port code worked in Python 2 but not 3
Replies: 3
Views: 942

Re: Serial port code worked in Python 2 but not 3

Further info: The first thing I did in my code was send a serial command to the device to change its default baud rate from 9600 to 115200. I now skip this and it is working - sort of. My device returns a NAK if it doesn't understand something. I get some commands accepted and some not. Something mu...
by MarkDH102
Fri May 06, 2016 1:38 pm
Forum: Python
Topic: Serial port code worked in Python 2 but not 3
Replies: 3
Views: 942

Serial port code worked in Python 2 but not 3

Frustrated. Trying to convert a python 2.x app which worked fine to python 3.x. I send many bytes over the serial port, this is just a snippet. Python 2 serialport.write(chr(0x41)) fine Python 3 serialport.write(b'\x41') not working I send a simple message to my device expecting a reply. Python2, re...
by MarkDH102
Tue Apr 26, 2016 4:39 pm
Forum: General discussion
Topic: Ways to reduce power usage?
Replies: 20
Views: 5338

Re: Ways to reduce power usage?

I use an Arduino home brew with a 328 processor hooked up to a DHT22(humidity), MPL3115A2 (pressure/temperature) and RFM12B (433MHz transceiver). (written in 'C'). 4*AA 2500mAh batteries last about 4 months. It wakes up every 15m, takes a reading and transmits it to an Arduino UNO in the house then ...
by MarkDH102
Sat Apr 16, 2016 4:38 pm
Forum: General discussion
Topic: Anyone used a Tecknet iEP390 9000mAh as UPS?
Replies: 3
Views: 1506

Re: Anyone used a Tecknet iEP390 9000mAh as UPS?

Ok. Cheers both. I think my pack must be faulty. I've plugged in my Sony Z3 phone to the 2A output and the Pi into the 1A and still it shuts down. It won't even charge my Z3, it starts to, then a minute or so later, cuts power to the phone but leaves all its blue led's lit. No worries. I will invest...
by MarkDH102
Fri Apr 15, 2016 2:58 pm
Forum: General discussion
Topic: ARRGGH Power cuts.
Replies: 28
Views: 6923

Re: ARRGGH Power cuts.

I've just posted about a Tecknet device which I'm trying to use as a UPS. My Pi's run as data loggers and only write the data onto the SD card at midnight (risky, I know, but it's not critical data). I have loads of power cuts and brownouts (living down a country lane in the middle of nowhere) and a...
by MarkDH102
Fri Apr 15, 2016 2:38 pm
Forum: General discussion
Topic: Anyone used a Tecknet iEP390 9000mAh as UPS?
Replies: 3
Views: 1506

Anyone used a Tecknet iEP390 9000mAh as UPS?

As the title. I have a Pi model B. Wifi dongle. Nothing else connected. Pack is fully charged. Pi starts to boot then just shuts down after approximately 30s. No LED's lit. Even if I disconnect the pack from the mains so it's not charging I get the same problem. I have tried many different USB cable...
by MarkDH102
Sun Mar 27, 2016 9:07 pm
Forum: Troubleshooting
Topic: Serial port Txing at startup even after disable in config
Replies: 2
Views: 817

Re: Serial port Txing at startup even after disable in confi

Thanks for that. I'll have a look in the morning...
by MarkDH102
Sun Mar 27, 2016 8:25 pm
Forum: Troubleshooting
Topic: Serial port Txing at startup even after disable in config
Replies: 2
Views: 817

Serial port Txing at startup even after disable in config

I am running Jessie on a Pi2 model B with a good 2A PSU. Serial is disabled in RaspiConfig. I've connected a 4D systems uLCD-32PT touch screen display (in serial mode @ 9600 baud). Rx/Tx/5V and GND. The RX/TX are 3.3V according to the display datasheet. I'm running Python 2.7. On boot up of the disp...
by MarkDH102
Tue Feb 23, 2016 9:15 am
Forum: General discussion
Topic: Should I reboot after apt-get upgrade
Replies: 4
Views: 2333

Re: Should I reboot after apt-get upgrade

So, I assume then, that the Pi will never? prompt me to do a reboot or do a reboot invisibly under kernel/firmware control (apart from a crash of course)?
Thanks for the previous answer.
by MarkDH102
Tue Feb 23, 2016 7:41 am
Forum: General discussion
Topic: Should I reboot after apt-get upgrade
Replies: 4
Views: 2333

Should I reboot after apt-get upgrade

My Pi's run 24/7
I VNC in and run update then upgrade once a week, but I've not rebooted for a couple of months now.
Should I?
by MarkDH102
Sat Feb 06, 2016 12:06 pm
Forum: General programming discussion
Topic: Running a Python Script AFTER X GUI Starts up?
Replies: 29
Views: 86408

Re: Running a Python Script AFTER X GUI Starts up?

Many thanks - worked a treat.
by MarkDH102
Fri Feb 05, 2016 2:12 pm
Forum: General programming discussion
Topic: Running a Python Script AFTER X GUI Starts up?
Replies: 29
Views: 86408

Re: Running a Python Script AFTER X GUI Starts up?

Sorry to resurrect an old thread. I have a python2 application using the camera interface and tkinter on a Pi2 running an up to date Jessie. I have added the path to autostart (LXDE-pi) as suggested and chmod +x but no matter what, I end up with a normal GUI after boot with no sign of my graphical a...
by MarkDH102
Fri Dec 18, 2015 4:14 pm
Forum: General programming discussion
Topic: Question on launching libreoffice calc from Python
Replies: 2
Views: 961

Re: Question on launching libreoffice calc from Python

Ok, thanks very much. Having a look now.
Regards Mark
by MarkDH102
Fri Dec 18, 2015 3:57 pm
Forum: General programming discussion
Topic: Question on launching libreoffice calc from Python
Replies: 2
Views: 961

Question on launching libreoffice calc from Python

Hi My Pi runs headless. I have a Python app which emails me daily with a csv file (just a standard text file containing climate info). I would like it to email with a jpg graph if possible. My plan was to launch libreoffice calc from Python, run a macro to chart the information and then somehow extr...
by MarkDH102
Wed Feb 18, 2015 8:28 am
Forum: Troubleshooting
Topic: Weak/nonexistent wifi
Replies: 4
Views: 675

Re: Weak/nonexistent wifi

Ok, I tried a powered hub. No joy, same problem. I then followed the captainbodgit advice. i.e. encrypting the psk. This had the effect of wpa_supplicant booting with an error and no visibility of my ra0 in WiFi config. I think I may have to give up on WiFi connectivity and stick to Ethernet. Shame....

Go to advanced search