Go to advanced search

by joelostinspace
Thu Dec 16, 2021 1:50 am
Forum: Python
Topic: Minecraft Pi Edition: unable to interact using mcpi
Replies: 1
Views: 127

Re: Minecraft Pi Edition: unable to interact using mcpi

try the shell.

Code: Select all

>>> from mcpi.minecraft import Minecraft
>>> mc= Minecraft.create()
>>> mc.postToChat('hello world')
by joelostinspace
Tue Dec 07, 2021 2:00 am
Forum: Python
Topic: trouble with remote control of servomotor
Replies: 5
Views: 339

Re: trouble with remote control of servomotor

I heard Benjamin Franklin used bluedot https://bluedot.readthedocs.io/en/latest/ and it's super easy!
by joelostinspace
Sat Oct 16, 2021 4:31 pm
Forum: Python
Topic: scipy import error
Replies: 10
Views: 562

Re: scipy import error

Glad you got it working. I'm guessing the library name won't be the same as the filename for it to work. Scripts with same names cause problems. namespace- what is it and why is it important: https://docs.python.org/3/tutorial/classes.html check out 9.2 in depth article on namespace and scope: https...
by joelostinspace
Tue Oct 12, 2021 4:08 pm
Forum: Python
Topic: scipy import error
Replies: 10
Views: 562

Re: scipy import error

your error is: >>ImportError: cannot import name '_fftpack' from 'scipy.fftpack' (/home/pi/scipy/fftpack/__init__.py) when I use help(scipy) my module is in: /usr/local/lib/python3.7/dist-packages/scipy/__init__.py looks like you have a name space problem with multiple installs. Maybe rename the sci...
by joelostinspace
Tue Sep 28, 2021 4:18 pm
Forum: Python
Topic: problem assigning a button function
Replies: 1
Views: 256

Re: problem assigning a button function

A/C_button = Button(alarm_tab, text = "Aircon Auto Mode", state='active', command=lambda: aircon(True)) A/C_button.pack(anchor='s') It's throwing an error unassigned int -> pick a new name: A divided by C underscore button is not acceptable. you've made the functions and there's no need f...
by joelostinspace
Sat Sep 04, 2021 11:39 am
Forum: Python
Topic: GUIZERO and GIF
Replies: 7
Views: 689

Re: GUIZERO and GIF

guizero is based on tkinter and is a entry level tool. To control the animated gif your going to display each frame with a timer.
For that use PhotoImage method from tkinter. here's a link to a similar question:https://stackoverflow.com/questions/285 ... th-tkinter
by joelostinspace
Mon Jul 05, 2021 9:28 pm
Forum: Python
Topic: "Exception in Tkinter callback" issue
Replies: 2
Views: 338

Re: "Exception in Tkinter callback" issue

Do guys think the errors are related or are they two different things. yes they're related directory: '/home/pi/Desktop/Jet Program looks like a typo the line in your picture is Jet Orientation Program I might want a combo box instead of a entry- what would happen if someone enters nothing or the w...
by joelostinspace
Sun Jun 27, 2021 2:01 pm
Forum: Python
Topic: PI4 Freenove Ultiamte kit, Blinking project
Replies: 1
Views: 265

Re: PI4 Freenove Ultiamte kit, Blinking project

hello,
I suggest to reverse the led, your contact may indicate that you are the ground not the source.
by joelostinspace
Tue Jun 08, 2021 9:56 am
Forum: Python
Topic: Camera Overlay
Replies: 3
Views: 252

Re: Camera Overlay

overlay in preview https://picamera.readthedocs.io/en/late ... he-preview
then read up on annotate on output.
by joelostinspace
Sat May 15, 2021 3:30 am
Forum: Python
Topic: Python code check for Form-C mechanical relay
Replies: 4
Views: 337

Re: Python code check for Form-C mechanical relay

When the NO switch closes, the AC voltage goes to a buck step-down converter where the output is changed to 3V DC I would like to know the temp and humidity and with those parameters heat, cool, add moisture or reduce and if that fails then send off an email. How many emails can you send in a coupl...
by joelostinspace
Wed May 12, 2021 2:50 am
Forum: Assistive technology and accessibility
Topic: Issues converting program to work with GUIzero
Replies: 4
Views: 2203

Re: Issues converting program to work with GUIzero

I don't understand why you need to cycle the button, if the intent is allow someone with limited communication a choice, why make it difficult to time the pressing of a button? How about 4 static buttons Yes, No, Maybe, I don't know and a dynamic question.
by joelostinspace
Tue May 11, 2021 2:18 am
Forum: Python
Topic: Openweathermap chance of rain
Replies: 2
Views: 295

Re: Openweathermap chance of rain

Another way is to use requests, use your own key. def get_dict(self,lat,lon,city,state): _lat= f'?lat={lat}' _lon= f'&lon={lon}' res= requests.get('https://api.openweathermap.org/data/2.5/onecall'+_lat+_lon+'&appid=xxxxxxxxxxhelloxxxxxxxxx&units=imperial') #removed key self.one_call= res...
by joelostinspace
Sun May 09, 2021 4:46 pm
Forum: Python
Topic: how do I implement the stop button to stop the program
Replies: 3
Views: 310

Re: how do I implement the stop button to stop the program

Notice when you press the start button the button remains depressed? that's because the main loop of the gui is waiting for the program to terminate, you can't click on stop or even close the program. One way around this is with threads. https://docs.python.org/3/library/threading.html here's an exa...
by joelostinspace
Wed May 05, 2021 8:52 pm
Forum: Python
Topic: Graphic interface with thonny python3
Replies: 1
Views: 202

Re: Graphic interface with thonny python3

Some libraries are installed by default tkinter and guizero, guizero is for beginners and information can be found here:
https://lawsie.github.io/guizero/ for examples on buttons widgets-> Button
by joelostinspace
Sun May 02, 2021 8:46 pm
Forum: Python
Topic: error with a usb mic by using pyaudio
Replies: 3
Views: 537

Re: error with a usb mic by using pyaudio

I have a similar output in my interactive prompt. To record you need to create a stream here's an example I modified that works on my pi. import pyaudio import wave from time import localtime now= localtime() chunk = 4096 # Record in chunks of 4096 samples sample_format = pyaudio.paInt16 # 16 bits p...
by joelostinspace
Thu Apr 29, 2021 10:37 pm
Forum: MicroPython
Topic: how to use pico adc measure current?
Replies: 12
Views: 737

Re: how to use pico adc measure current?

you use a multi-meter and connect in series or an Amprobe with clamp and of course Ohms Law.
by joelostinspace
Thu Apr 29, 2021 10:30 pm
Forum: Python
Topic: error with a usb mic by using pyaudio
Replies: 3
Views: 537

Re: error with a usb mic by using pyaudio

pip install pyaudio
try

Code: Select all

pip3 install pyaudio
for python 3
by joelostinspace
Thu Apr 29, 2021 4:30 am
Forum: Python
Topic: Alarm Display
Replies: 3
Views: 230

Re: Alarm Display

you don't explain the gpio station part so I really can't comment on that part- your check function is creating new widgets every second. The solution is to create the label once and update that label every second. you have used the same name for each label: label=tk.Label(frame,text="S 24"...
by joelostinspace
Tue Apr 20, 2021 7:30 pm
Forum: Python
Topic: Failed building wheel for llvmlite for ARM64
Replies: 2
Views: 1777

Re: Failed building wheel for llvmlite for ARM64

how about installing previous versions? or a range of versions? 0.34 or 0.33
by joelostinspace
Tue Apr 20, 2021 7:18 pm
Forum: Python
Topic: Control omxplayer voulme from python command.
Replies: 3
Views: 286

Re: Control omxplayer voulme from python command.

they have a omxplayer wrapper https://pypi.org/project/omxplayer-wrapper/ use the link to the documents, and you'll also need keyboard inputs, I use tkinter but pygame or any other library will work
by joelostinspace
Sat Apr 03, 2021 5:50 pm
Forum: Python
Topic: Tkinter GUI with Keypad
Replies: 1
Views: 295

Re: Tkinter GUI with Keypad

I don't understand this: My problem is I am having trouble mapping the key presses to change the focuses on the GUI in your code: while True: keypadArrows(L1) keypadArrows(L2) keypadArrows(L3) time.sleep(0.1) gui.mainloop() the while true statement blocks the gui mainloop here's an example: from tki...
by joelostinspace
Sat Apr 03, 2021 5:03 pm
Forum: Python
Topic: Python-pandas in Debian
Replies: 2
Views: 1539

Re: Python-pandas in Debian

To upgrade an already installed package to the latest from PyPI: >>pip install --upgrade PackageName.
try:

Code: Select all

pip3 install --upgrade pandas
by joelostinspace
Tue Mar 30, 2021 2:23 pm
Forum: Python
Topic: gpsd installed, still get ModuleNotFoundError: No module named 'gpsd' on import
Replies: 3
Views: 590

Re: gpsd installed, still get ModuleNotFoundError: No module named 'gpsd' on import

this looks like it's python2 module check in your terminal-> python >> import gps.

Go to advanced search