Go to advanced search

by MarkDH102
Mon Nov 11, 2019 7:31 am
Forum: General discussion
Topic: Two adruino are connected to the raspberry via usb, but one is reconnected during processing code is running
Replies: 3
Views: 183

Re: Two adruino are connected to the raspberry via usb, but one is reconnected during processing code is running

The only thing that I can see is an undervoltage on the Pi. How are you powering the Arduinos? 3V3 or 5V? From the Pi or from a separate power supply? Maybe the voltage on the Arduino is dropping enough to cause the BOD (brown out detector) on the Arduino ATMEGA328 chip to become activated thus forc...
by MarkDH102
Thu Nov 07, 2019 7:20 am
Forum: General discussion
Topic: Interesting interview with Eben in Physics World
Replies: 41
Views: 3092

Re: Interesting interview with Eben in Physics World

In terms of using the Pi in an industrial environment, I cannot believe it would be in any kind of "critical" control type of operation - just monitoring as stated in the article. The SD card solution is just too unreliable for 24/7 running...and each Pi would need a UPS plus some really good noise ...
by MarkDH102
Sat Nov 02, 2019 7:17 pm
Forum: Troubleshooting
Topic: Do I have a problem - looking at this bit of syslog?
Replies: 3
Views: 302

Re: Do I have a problem - looking at this bit of syslog?

Hi epoch1970 Thanks for that. I use an official Pi PSU and can see a good solid 5V on the board. But I have now put a monitoring device on to see if it varies. I do run headless. And for that reason, I need to run haveged (I don't know why) to produce enough randomness for VNC to work properly. If I...
by MarkDH102
Sat Nov 02, 2019 7:21 am
Forum: Troubleshooting
Topic: Do I have a problem - looking at this bit of syslog?
Replies: 3
Views: 302

Do I have a problem - looking at this bit of syslog?

My Pi0 with Stretch has been doing something odd for a few months now. My python application logs climate information and has run successfully for a number of years. In the last few months at random times of the day (not every day), I seem to get a lockup where my data is not recorded and the CPU te...
by MarkDH102
Mon Oct 21, 2019 7:29 am
Forum: Off topic discussion
Topic: How can I make a Pi0W into a bluetooth server using python?
Replies: 9
Views: 2692

Re: How can I make a Pi0W into a bluetooth server using python?

'C' code (Arduino) for my ESP32 (A Heltec Kit32 with OLED) - as promised. A bit rough and ready but it works with the Pi code that Douglas6 posted. /* * Program to operate ESP32 in client mode and get served information from a Raspberry Pi * Program by: Mark Hollingworth * The code for the Raspberry...
by MarkDH102
Sat Oct 19, 2019 6:24 am
Forum: Off topic discussion
Topic: How can I make a Pi0W into a bluetooth server using python?
Replies: 9
Views: 2692

Re: How can I make a Pi0W into a bluetooth server using python?

HI Douglas6 I have got it working now and will post the 'C' code that works on an ESP32 when I have tidied it up so that other people may make use of it. Thanks for the advice about connecting. That is the conclusion that I had arrived at. I can't profess to fully understand what is going on in the ...
by MarkDH102
Thu Oct 17, 2019 6:23 am
Forum: Off topic discussion
Topic: How can I make a Pi0W into a bluetooth server using python?
Replies: 9
Views: 2692

Re: How can I make a Pi0W into a bluetooth server using python?

Hi Douglas6

It does exactly what I want. Thanks. It works as advertised on the app you suggested for the Android phone and I see it as a device on my ESP32.
Now I've got to work out why I can't see the services on my ESP32, but that's my problem now...

Regards Mark
by MarkDH102
Thu Oct 17, 2019 6:19 am
Forum: General discussion
Topic: Display lxterminal at specific screen location
Replies: 2
Views: 263

Re: Display lxterminal at specific screen location

I use xdotool. You will have to install it. However, I run it from within a python script that runs in the terminal window and call it using : import os os.system("xdotool getactivewindow windowmove 40 35 windowsize --usehints 165 43") I guess you can call it from the shortcut but I don't know how t...
by MarkDH102
Wed Oct 16, 2019 6:14 am
Forum: Off topic discussion
Topic: How can I make a Pi0W into a bluetooth server using python?
Replies: 9
Views: 2692

Re: How can I make a Pi0W into a bluetooth server using python?

Hi Douglas6

Thanks for the link. I've downloaded and will be playing shortly. I like a well documented GitHub repository. Many thanks.
by MarkDH102
Tue Oct 15, 2019 6:42 pm
Forum: Off topic discussion
Topic: How can I make a Pi0W into a bluetooth server using python?
Replies: 9
Views: 2692

Re: How can I make a Pi0W into a bluetooth server using python?

Many thanks. I will take a look in the morning when I'm more awake...
by MarkDH102
Tue Oct 15, 2019 6:37 pm
Forum: Beginners
Topic: Bluetooth body scale data to Raspberry
Replies: 2
Views: 243

Re: Bluetooth body scale data to Raspberry

If you can get one cheaply enough, try a WiiFit board. I have code that connects to one (via Bluetooth) and weighs me/my wife, emails us the bad news and then stores the data in a file for a historical record. It only does weight mind you...
by MarkDH102
Tue Oct 15, 2019 6:26 pm
Forum: Off topic discussion
Topic: How can I make a Pi0W into a bluetooth server using python?
Replies: 9
Views: 2692

How can I make a Pi0W into a bluetooth server using python?

I have an ESP32 on which I am running the Arduino example Bluetooth sniffer code (in C via Arduino IDE). I presume this is the "client". The ESP32 is BLE. I want to run python code on my Pi0W (Stretch) to turn it into a simple Bluetooth server (I hope that I have the terminology correct). I'm just t...
by MarkDH102
Mon Sep 16, 2019 6:17 am
Forum: Troubleshooting
Topic: How to debug this issue with a Pi0?
Replies: 1
Views: 154

Re: How to debug this issue with a Pi0?

Hi all, I've got 3 more plots now, showing the same symptoms (all at different times of the day) and 2 fully normal plots. The Pi0 goes into what appears to be an unresponsive mode. No VNC and my python application appears to stop gathering data. Is there a log anywhere that might shed some light on...
by MarkDH102
Wed Sep 11, 2019 6:24 am
Forum: Troubleshooting
Topic: How to debug this issue with a Pi0?
Replies: 1
Views: 154

How to debug this issue with a Pi0?

My Pi0 has been running the same code successfully for a few years now. The last 3 nights I have seen a sort of lock-up. VNC won't respond. WiFi light on Edimax is off. I log temperatures/pressures and humidities. On the graph, look at the cpu around 19:30. It coincides with the other temperatures s...
by MarkDH102
Mon Sep 09, 2019 6:20 am
Forum: Python
Topic: Pi zero w - not able to install packages using pip
Replies: 2
Views: 297

Re: Pi zero w - not able to install packages using pip

I don't know what is causing your problem, but I very recently installed lxml (scraper) on a Pi0W with no issues. On a different Pi0W, I also installed pushbullet for python2 and python3 using pip as follows : To install for Python2 sudo apt-get install python-lxml sudo pip install pushbullet.py To ...
by MarkDH102
Wed Sep 04, 2019 6:16 am
Forum: Advanced users
Topic: Problem with Raspberry - Arduino serial communication
Replies: 1
Views: 450

Re: Problem with Raspberry - Arduino serial communication

DON'T WIRE IT TOGETHER LIKE THAT... The Arduino UNO runs at 5V so the serial port lines toggle between 0V and 5V. The Raspberry Pi runs at 3.3V. You will kill the Pi if you also attach the Tx (Arduino) to the Rx (Pi). Plug the Arduino into a USB port instead. I used to use code like the below to fin...
by MarkDH102
Mon Sep 02, 2019 4:12 pm
Forum: General discussion
Topic: Project compatibility
Replies: 14
Views: 639

Re: Project compatibility

I have generally found windows development and deployment a LOT easier than anything I've done on Unix. And I'm going back to good old turbo pascal and basic days and I am still able to run some vb6 and mfc code on win10! But I do remember dll hell which I always used to circumvent by supplying all ...
by MarkDH102
Mon Sep 02, 2019 6:15 am
Forum: General discussion
Topic: Project compatibility
Replies: 14
Views: 639

Re: Project compatibility

Well, I'm a glass half full kind of guy unfortunately. So, I would be wary. I have 8 different Pi's (0's 0W's P2B's and a 3) all running projects on the Stretch OS. I am in no hurry at all to update to Buster as I see so many issues with it at the moment which will I am sure be fixed in the fullness...
by MarkDH102
Wed Aug 28, 2019 9:30 am
Forum: Python
Topic: Why can't I trap this error?
Replies: 5
Views: 635

Re: Why can't I trap this error?

Thanks PeterO. I've done an import of gaierror from socket and it all seems to hang together now...
by MarkDH102
Tue Aug 27, 2019 10:52 am
Forum: Python
Topic: Read, Plot and save from xls data
Replies: 5
Views: 638

Re: Read, Plot and save from xls data

First, install gnuplot sudo apt-get install gnuplot-x11 Run gnuplot from the command line (this plots two lines of data SPACE separated in the file "xxx.csv") data1 data2 data1 data2 ... dataN dataN gnuplot "xxx.csv" using 0:1 with lines lw 2, "xxx.csv" using 0:2 with lines lw 2 ; set term jpeg ; se...
by MarkDH102
Tue Aug 27, 2019 7:39 am
Forum: Python
Topic: Why can't I trap this error?
Replies: 5
Views: 635

Re: Why can't I trap this error?

Hi PeterO

I did try to trap that error, but I got a "Name Error: name socket is not defined" - which when I look at it, is logical...
What I don't really understand is the except: on its own not catching it? I thought that would handle all other errors (except timeout).
by MarkDH102
Tue Aug 27, 2019 6:21 am
Forum: Python
Topic: Why can't I trap this error?
Replies: 5
Views: 635

Why can't I trap this error?

My abbreviated code is : try : server=smtplib.SMTP('smtp-mail.outlook.com', 587) # Other code # This exception is generated by me with a signal handler except (TimeoutException) : addLogMessage("Retry data timeout") except : addLogMessage("Retry data FAIL") finally : addLogMessage("Finally") Why am ...
by MarkDH102
Tue Aug 27, 2019 6:12 am
Forum: Python
Topic: Read, Plot and save from xls data
Replies: 5
Views: 638

Re: Read, Plot and save from xls data

Can you save the XLS data in CSV format?
If so you could invoke gnuplot from python to create a JPEG file with the data graphed.
It's how I create my environmental plots.
by MarkDH102
Sat Aug 17, 2019 5:29 pm
Forum: Python
Topic: No data written in CSV file
Replies: 8
Views: 1845

Re: No data written in CSV file

I've never used log before,but my assumption is that it needs to be closed before you can read the file. Also,it is better to specify an absolute path. Although as you can see the file this doesn't matter so much. There may also be a flush operation which you can call after each write which will com...
by MarkDH102
Thu Aug 15, 2019 10:53 am
Forum: General discussion
Topic: Pi Zero W Temperature issue
Replies: 3
Views: 422

Re: Pi Zero W Temperature isuue

In your python script, do you have an infinite loop? while true : doYourCode While your python script is running open a cmd prompt and type top (then press ENTER) If it shows python using 100% then that is your problem. If you can, insert a time.sleep(0.1) call : import time while true : doYourCode ...

Go to advanced search