Go to advanced search

by RogerW
Fri Jun 25, 2021 1:44 pm
Forum: General programming discussion
Topic: How to generate an audio tone from a program
Replies: 13
Views: 788

Re: How to generate an audio tone from a program

Thanks for the replies and links. I am not after authenticity - just a project to use some pi related bits and pieces. I have Sharp distance sensors, a pi zero w and mcp3008 AtoD. chips. I have already written software to read the mcp3008 in python and C++. Looks like MIDI might be the way to go but...
by RogerW
Thu Jun 24, 2021 5:07 pm
Forum: General programming discussion
Topic: How to generate an audio tone from a program
Replies: 13
Views: 788

Re: How to generate an audio tone from a program

PiGraham Thanks for the rply. I am trying to develop a theramin so I need to slide frequency and volume depending on the input fro two sensors. With pygame I cannot change the frequency fast enough. MIDI may be useful but I am afraid I don't see how. knute Thanks for the code. I am not familiar with...
by RogerW
Thu Jun 24, 2021 4:23 pm
Forum: General programming discussion
Topic: How to generate an audio tone from a program
Replies: 13
Views: 788

Re: How to generate an audio tone from a program

Yes I have tried pygame and it will generate a tone. However I need to seemlesly change the frequency and I cannot do this with pygame. There is a time delay when I change frequency that I cannot find a way round.
by RogerW
Thu Jun 24, 2021 12:55 pm
Forum: General programming discussion
Topic: How to generate an audio tone from a program
Replies: 13
Views: 788

Re: How to generate an audio tone from a program

See this post https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=313592#p1876682 Thanks for the link. Unfortunately I want to use the standard audio output via bluetooth. I know I could output to a PIO but I do not want to use external hardware and I would prefer not to use a square wave.
by RogerW
Thu Jun 24, 2021 12:33 pm
Forum: General programming discussion
Topic: How to generate an audio tone from a program
Replies: 13
Views: 788

Re: How to generate an audio tone from a program

My plan is to use Bluetooth
by RogerW
Thu Jun 24, 2021 10:40 am
Forum: General programming discussion
Topic: How to generate an audio tone from a program
Replies: 13
Views: 788

How to generate an audio tone from a program

I want to generate an audio tone through the standard audio output. I need to dynamically control the frequency and volume. I am happy to use C/C+ or python. I have tried using the pygame mixer. This works and I can generate a sine wave tone and control frequency and volume. Unfortunately to change ...
by RogerW
Sun Apr 18, 2021 9:47 am
Forum: Raspberry Pi OS
Topic: FreeCAD on PI4 and Raspbian Buster.
Replies: 119
Views: 30604

Re: FreeCAD on PI4 and Raspbian Buster.

Thanks for that. I will have to wait.
by RogerW
Sun Apr 18, 2021 9:10 am
Forum: Raspberry Pi OS
Topic: FreeCAD on PI4 and Raspbian Buster.
Replies: 119
Views: 30604

Re: FreeCAD on PI4 and Raspbian Buster.

thanks. FreeCAD 0.19 (23841) + raspberry pi 4 4Gb + raspberry pi OS 64 bits (beta) It is already installed and working reasonably well, I have used: sudo apt install build-essential libtool lsb-release cmake cmake-gui cmake-curses-gui libboost-date-time-dev libboost-dev libboost-filesystem-dev libb...
by RogerW
Wed Apr 14, 2021 11:19 am
Forum: Python
Topic: Tkinter numeric keypad
Replies: 1
Views: 221

Re: Tkinter numeric keypad

I have updated the version on Github to make the Key class more generally useful. This is a more traditional approach to a test program. N.B. root is not a keyword. # Xpad.py # Traditionalist test program from sys import version_info if version_info[0] < 3: import Tkinter as tk else: import tkinter ...
by RogerW
Mon Apr 05, 2021 1:09 pm
Forum: Python
Topic: Tkinter numeric keypad
Replies: 1
Views: 221

Tkinter numeric keypad

I wrote this for a program I am working on and thought it might be useful to other people. It works with python 2 or 3 It works like a dialog. You can choose size, integer/decimal, signed/unsigned when the dialog is created. The code is also on Github https://github.com/RogerWoollett/Keypad It would...
by RogerW
Sun Feb 07, 2021 5:16 pm
Forum: Python
Topic: I encounter differences between [Python + QT] and [PLC + HMI]:
Replies: 5
Views: 442

Re: Automation engineer writing code in Python

As has been pointed out GUI frameworks are event driven. This hopefully makes your project easier. This example uses tkinter rather than QT but might help to show how this may work. The function after calls a function after a time delay. In between time other things can happen. to run this save the ...
by RogerW
Tue Nov 03, 2020 2:29 pm
Forum: C/C++
Topic: Compiling OpensCAD for Pi 4 armhf
Replies: 12
Views: 1184

Re: Compiling OpensCAD for Pi 4 armhf

I got an appimage from
https://github.com/koendv/openscad-raspberrypi

Click on "You can download the binary here."
Works for me on 32 bit Raspberry Pi OS
by RogerW
Sun Nov 01, 2020 4:49 pm
Forum: Graphics programming
Topic: Tkinter -- pack with place?
Replies: 2
Views: 298

Re: Tkinter -- pack with place?

You should look at grid rather than pack, This allows you to place your widget by row and column.
by RogerW
Mon Oct 26, 2020 3:50 pm
Forum: General discussion
Topic: tkinter entry field problem
Replies: 10
Views: 646

Re: tkinter entry field problem

You may find the after function useful This code takes the text from the Entry when the save button is pressed. The text is cleared 10 seconds later. import tkinter as tk class App(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.title('Text entry') # create Entry widget self.text = tk.StringVa...
by RogerW
Mon Jun 29, 2020 4:15 pm
Forum: Advanced users
Topic: Are M.2 SSD drives worth the extra
Replies: 10
Views: 2084

Re: Are M.2 SSD drives worth the extra

Thanks for the advice. I think I understand a bit better now.
by RogerW
Mon Jun 29, 2020 11:32 am
Forum: Advanced users
Topic: Are M.2 SSD drives worth the extra
Replies: 10
Views: 2084

Are M.2 SSD drives worth the extra

I am thinking of getting a Pi4B8 and a SATA SSD for the file system. My question is whether it is worth the extra for an M.2 standard disc and enclosure or will I see no practical improvement in performance over a cheaper disc.
by RogerW
Sun Apr 19, 2020 8:24 am
Forum: Raspberry Pi OS
Topic: Auto login but not pi
Replies: 4
Views: 449

Re: Auto login but not pi

Log in as your prefered user.
Start raspi-config in a Terminal window.
Choose option 3 - Boot options
Choose option B1
Choose option B4
That should do it.
by RogerW
Sat Apr 18, 2020 4:34 pm
Forum: Raspberry Pi OS
Topic: Auto login but not pi
Replies: 4
Views: 449

Re: Auto login but not pi

Solution is to use raspi-config not the GUI configuration.
by RogerW
Sat Apr 18, 2020 4:26 pm
Forum: Raspberry Pi OS
Topic: wxPython install fails
Replies: 1
Views: 339

Re: wxPython install fails

Should anyone else have this problem - I found a solution.

Code: Select all

sudo apt install python3-wxgtk4.0
That plus

Code: Select all

sudo pip3 install appdirs
and pronterface works.
by RogerW
Sat Apr 18, 2020 8:38 am
Forum: Raspberry Pi OS
Topic: wxPython install fails
Replies: 1
Views: 339

wxPython install fails

I am trying to run Pronterface which is part of Printrun. It fails because it requires wxPython >= 4.

"sudo pip3 install wxPython" hangs when
"Running setup.py bdist_wheel for wxPython"

Has anyone found a way round this?
by RogerW
Thu Apr 16, 2020 2:11 pm
Forum: Raspberry Pi OS
Topic: Auto login but not pi
Replies: 4
Views: 449

Auto login but not pi

I would like to auto login us user roger not pi. In Jessie the Configuration allwed "As current user" but Buster only offers pi. Is there a way to change this. Ihave searched but cannot find a way.
by RogerW
Wed Nov 27, 2019 10:30 am
Forum: Python
Topic: Display full screen image using Python?
Replies: 5
Views: 2439

Re: Display full screen image using Python?

Paddyg beat me to it but this should run

Code: Select all

import tkinter as tk

main = tk.Tk()
main.attributes('-fullscreen',True)
tk.Button(main,text='Quit',command=main.destroy).pack()
main.mainloop()
by RogerW
Mon Aug 26, 2019 10:35 am
Forum: C/C++
Topic: Reading different channels from MCP3008 with pigpio
Replies: 4
Views: 2212

Re: Reading different channels from MCP3008 with pigpio

I have some C++ code which (among other things) reads data from a MCP3008. It uses the pigpio c library not the daemon. Header file [// Rpio.h // Written by Roger Woollett // // Low level interface to hsrdware via gpio // Uses the pigpio library and the base class // PioBase ensures that the library...
by RogerW
Wed Jul 24, 2019 9:15 am
Forum: Raspberry Pi OS
Topic: STICKY: Buster bug report thread
Replies: 409
Views: 124941

Re: Buster bug report thread

sudo apt-get install pigpio fails on buster lite. I have a C program that needs libpigpio.so which does not appear to be included with buster lite. On stretch install pigpio worked. On buster I get "Temporary failure resolving....". I have tried several times and tried the suggested option...
by RogerW
Fri Apr 26, 2019 8:52 am
Forum: C/C++
Topic: Low voltage detection
Replies: 10
Views: 4442

Re: Low voltage detection

Thanks for that information. Because I wanted to detect transient low voltage blips I was hoping for an "interupt" type of solution rather than polling. I have now decided it is not worth pursuing unless it definitely proves to be a problem which I supect is unlikely.

Go to advanced search