Go to advanced search

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: 619

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: 619

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: 619

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: 103

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: 619

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: 619

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: 86

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: 619

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: 100

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: 100

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: 166

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: 152

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: 16
Views: 444

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: 16
Views: 444

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: 490

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: 483

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: 490

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: 490

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: 483

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: 1705

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: 346

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 ...
by MarkDH102
Thu Aug 15, 2019 6:09 am
Forum: General discussion
Topic: Is this possible? Auto copy iOS device images folder.
Replies: 4
Views: 281

Re: Is this possible? Auto copy iOS device images folder.

Why not set up multiple Pi's with cameras to take the photos automatically?
Lot cheaper than Iphones!
by MarkDH102
Wed Jul 17, 2019 11:50 am
Forum: Troubleshooting
Topic: ELM327 doesn't respond to RP3 via Bluetooth
Replies: 5
Views: 320

Re: ELM327 doesn't respond to RP3 via Bluetooth

I would be interested in knowing what model of OBD device you are using and what vehicle you are connecting it to.
I'm looking at doing something similar, but none of the "cheap" OBD adapters seem to fully support ELM327 (or at least don't support the full AT command set).

Cheers.
by MarkDH102
Fri Jul 12, 2019 6:17 am
Forum: Beginners
Topic: setting up claws mail on a Pi Zero W
Replies: 3
Views: 209

Re: setting up claws mail on a Pi Zero W

This is my configuration - it is for an outlook account and I've subtly changed my email address...
The other pages i.e. Send, Receive will be gmail specific. Type gmail pop settings into google and it should give you what you need to know.
Hope this helps.
1.jpg
1.jpg (92.3 KiB) Viewed 121 times
by MarkDH102
Sat Jun 29, 2019 4:36 am
Forum: General discussion
Topic: How do I avoid installing Buster?
Replies: 9
Views: 509

Re: How do I avoid installing Buster?

...dist-upgrade or apt full-upgrade will not take you to a newer release, why do you believe that ? Well, I just assumed and didn't really know the answer which is why I asked the question. :D That opens another question for me. Can the "sources" file be changed by a dist or full upgrade without me...

Go to advanced search