Go to advanced search

by Paul Hutch
Thu Dec 02, 2021 12:46 pm
Forum: General discussion
Topic: Read digits from IC TMI1640 driver for 7 segment
Replies: 4
Views: 210

Re: Read digits from IC TMI1640 driver for 7 segment

From a quick scan of the data sheet, that is a limited feature 16 digit display driver with a serial data input and no serial data output (it's a write only device). So there is no way to read back what you have written to the IC via the standard inputs on a Pi. To read the LED outputs you'll need t...
by Paul Hutch
Thu Dec 02, 2021 12:32 pm
Forum: Python
Topic: Optimization of a desktop application for a 4-inch LCD screen
Replies: 6
Views: 320

Re: Optimization of a desktop application for a 4-inch LCD screen

The form "template1.ui" is 969x734 pixels. Most 4" LCD screens are 800x600 pixels or less in size and if you have a desktop environment active the task bar will make the usable size even smaller, so the 969x734 pixel form has to be cropped. To fix it resize the form to be the same siz...
by Paul Hutch
Mon Nov 22, 2021 2:41 pm
Forum: Python
Topic: Serial input from another microcontroller
Replies: 3
Views: 194

Re: Serial input from another microcontroller

PySerial returns data as the "bytes" type.
https://docs.python.org/3/library/stdtypes.html#bytes

There are many ways to convert from bytes to other data types. I like to use the Python struct library for unpacking the bytes.
https://docs.python.org/3/library/struct.html
by Paul Hutch
Thu Nov 18, 2021 2:50 pm
Forum: Python
Topic: Optimization of a desktop application for a 4-inch LCD screen
Replies: 6
Views: 320

Re: Optimization of a desktop application for a 4-inch LCD screen

One way is to run without a desktop manager (there will be no frame/system controls on the windows), design your forms to be the exact size in pixels of your small screen, set Pi OS to boot to the command line (not the desktop), then use startx program_path_and_name from the command line to launch t...
by Paul Hutch
Wed Nov 17, 2021 12:55 pm
Forum: Advanced users
Topic: WiFi scanner using scapy show only 5GHz and not 2.4?
Replies: 3
Views: 182

Re: WiFi scanner using scapy show only 5GHz and not 2.4?

Pi 3B only has a 2.4GHz radio

Pi 3B+ has both 2.4GHz & 5GHz radios
by Paul Hutch
Tue Nov 16, 2021 6:14 pm
Forum: Python
Topic: Python 3.9 Bullseye
Replies: 17
Views: 843

Re: Python 3.9 Bullseye

Why is it that the python addons such as pygame have not been updated to their later releases? Thanks, Good question. AFAIK the decision is made by the Debian packaging team so we need to search their info sources to figure out why they froze to the older version. It also appears that the pygame ve...
by Paul Hutch
Tue Nov 16, 2021 4:58 pm
Forum: Python
Topic: LibreOffice Calc spreadsheets Programmatically with Python.
Replies: 5
Views: 265

Re: LibreOffice Calc spreadsheets Programmatically with Python.

So far I've only ever used CSV file creation to create files for LibreOffice Calc. However there is direct ODS file support avaialable that I plan to play with next time I need to create files for Calc via Python.
https://pypi.org/project/pyexcel-ods3/
by Paul Hutch
Tue Nov 16, 2021 3:24 pm
Forum: Python
Topic: Pyqt5 change button color not works
Replies: 4
Views: 380

Re: Pyqt5 change button color not works

OK now that the posted line is correct it should work (all of my own button color change code works with that syntax). Assuming it doesn't work, some other line of code, your logic flow, or something else about the whole program structure must be causing the problem for you. If you post the rest of ...
by Paul Hutch
Sat Nov 06, 2021 11:55 am
Forum: Python
Topic: Pyqt5 change button color not works
Replies: 4
Views: 380

Re: Pyqt5 change button color not works

The code you posted is missing the colon, color, closing quote and closing parenthesis from a proper setStyleSheet() call.
by Paul Hutch
Tue Oct 26, 2021 4:04 pm
Forum: Python
Topic: Python GPIO pins configuration
Replies: 8
Views: 289

Re: Python GPIO pins configuration

I've copied your code into a Python aware editor and found these problems: Line 4: no space between keyword import and module name spidev (probably a copy paste error) Line 26: no space between keyword def and function name getAdc (probably a copy paste error) Lines 27 up to the end have inconsisten...
by Paul Hutch
Mon Oct 25, 2021 11:53 pm
Forum: Python
Topic: Simultaneous Operations in Python
Replies: 11
Views: 766

Re: Simultaneous Operations in Python

I can't remember the details now because I only had to deal with this for one project and it was a couple years ago.

IIRC I found that multiprocess was too complicated for my usage and threading only used a single core in the processor, so I most often used subprocess.Popen.
by Paul Hutch
Mon Oct 25, 2021 2:49 pm
Forum: Advanced users
Topic: JupyterHub running on RPi 4 8GB
Replies: 5
Views: 274

Re: JupyterHub running on RPi 4 8GB

Also, as a side note, mDNS works out of the box as of Windows 10 10.0.19042. That's what I'd heard so I thought I'd save some time bringing up 3 new PC's for engineering and production at work last month. However, after all updates were applied I found that some applications on the PCs did not reco...
by Paul Hutch
Sun Oct 24, 2021 3:03 pm
Forum: Advanced users
Topic: JupyterHub running on RPi 4 8GB
Replies: 5
Views: 274

Re: JupyterHub running on RPi 4 8GB

Not a Win11 user so this is more of wild guess than informed speculation. Perhaps Win11 is deprecating connections that don't use name lookup since direct IP# connections are often used in phishing attacks. Try using the mDNS hostname.local method of connection e.g http://mypi.local:8888. In Win10, ...
by Paul Hutch
Sat Oct 23, 2021 1:31 pm
Forum: Python
Topic: Raspberry Pi 3b + Adhoc & UDP connect
Replies: 1
Views: 220

Re: Raspberry Pi 3b + Adhoc & UDP connect

Do you have the Pi set to wait for the network at boot? If not you can set it in raspi-config.
by Paul Hutch
Fri Oct 15, 2021 12:37 pm
Forum: Python
Topic: Interrupt with 555 timer
Replies: 5
Views: 387

Re: Interrupt with 555 timer

I'm experimenting using 555 timer ( 3V type ) in one shot mode to get a perfect pulse ( 100 ms ) to interrupt PI. Perfect pulse? The output from a 555 timer is about as far from a perfect pulse generated by an integrated circuit as I can imagine. The CPU can make a far more accurate and regular pul...
by Paul Hutch
Fri Oct 15, 2021 12:13 pm
Forum: General discussion
Topic: Real Time Operating System Example
Replies: 1
Views: 250

Re: Real Time Operating System Example

The video is showing that none of those undesirable things are happening because the Pi is running on their custom real time OS. It would have been nice if they showed the same experiment with with the PI running Raspberry Pi OS for comparison. A computer always has some delay between when an event ...
by Paul Hutch
Thu Oct 14, 2021 4:04 pm
Forum: General discussion
Topic: Hostname Problem
Replies: 7
Views: 426

Re: Hostname Problem

I believe it was/is possible on some platforms/distros to manually edit the hostname to include characters that are not allowed by RFC's 952, 1123 & 1178 (IIRC I did it last century with MS-DOS IP networking). A name with invalid characters may work perfectly fine on your local network for the s...
by Paul Hutch
Tue Oct 12, 2021 3:10 pm
Forum: General discussion
Topic: Can we Use hostname instead of IP in windows networking and programming
Replies: 5
Views: 294

Re: Can we Use hostname instead of IP in windows networking and programming

This may be pointless as the OP registered and made one post that contains a Taco Bell Spam link at the end so, may just be a spammer. Windows 10 does not include a complete solution for all uses of .local addresses (mDNS). Windows 10 with the latest updates seems to provide it for many things but s...
by Paul Hutch
Thu Oct 07, 2021 1:16 pm
Forum: Advanced users
Topic: Check if Pi system time valid/set from Python
Replies: 11
Views: 581

Re: Check if Pi system time valid/set from Python

Here's how I did it last year: def is_timesyncd_synchronized(): """Query the system to see if NTP has synchronized WARNING: this is a blocking subprocess.""" subprocess_instance = subprocess.Popen(['timedatectl'], stdout=subprocess.PIPE, universal_newlines=True) cmd_out...
by Paul Hutch
Sat Oct 02, 2021 2:06 pm
Forum: General discussion
Topic: Hostname Problem
Replies: 7
Views: 426

Re: Hostname Problem

Underscores are not valid in hostnames, you can use a hyphen however some platforms have problems with hyphens. (IIRC some older Windows platforms don't recognize hyphens) https://man7.org/linux/man-pages/man7/hostname.7.html Valid characters for hostnames are ASCII(7) letters from a to z, the digit...
by Paul Hutch
Thu Sep 30, 2021 10:37 pm
Forum: General discussion
Topic: Why is wifi so unreliable on RPI4?
Replies: 47
Views: 3040

Re: Why is wifi so unreliable on RPI4?

and thats why any product has to go thru fcc testing, even if you dont think its an rf emitter! Actually only analog devices that intentionally create radio signals, and digital devices that operate above 9kHz require FCC testing. Products outside that scope are exempt from FCC compliance testing. ...
by Paul Hutch
Tue Sep 07, 2021 12:28 pm
Forum: Weather station
Topic: Air temp accuracy
Replies: 11
Views: 1236

Re: Air temp accuracy

You can buy a well designed unit with actual specifications for how inaccurate your readings will be depending on wind speed, for under $150.00. https://www.youngusa.com/product/multi-plate-radiation-shield/ FYI - all manufacturers call these solar radiation shields because they are not Stevenson sc...
by Paul Hutch
Tue Aug 24, 2021 2:50 pm
Forum: Python
Topic: Continuously appending CSV file
Replies: 10
Views: 810

Re: Continuously appending CSV file

Second question: Right now for test runs I just have a PS running at 3V. I connect that with banana clips to the GPIO pins on the RPi. WARNING, I haven't completely absorbed all the info in the multiple messages, and I could not spot question 2 about powering the Pi, so I may be way off base. If th...
by Paul Hutch
Mon Aug 23, 2021 12:43 pm
Forum: Advanced users
Topic: Disable keyboard/mouse
Replies: 13
Views: 1070

Re: Disable keyboard/mouse

It would be much easier to simply not install a mouse and keyboard.

If you are worried that users will attach their own mouse and keyboard, then do not expose the USB ports to the user.

Go to advanced search