Go to advanced search

by pootle
Mon Jun 24, 2019 7:07 am
Forum: General discussion
Topic: Do we get Vulkan on Pi 4?
Replies: 16
Views: 3527

Re: Do we get Vulkan on Pi 4?

mmm that would be tasty. Won't hold me breath though
by pootle
Mon Jun 24, 2019 7:01 am
Forum: General discussion
Topic: Do we get Vulkan on Pi 4?
Replies: 16
Views: 3527

Do we get Vulkan on Pi 4?

Just askin....
by pootle
Tue Jun 18, 2019 8:38 am
Forum: Networking and servers
Topic: WORKAROUND; intermittent disconnects with r8152 chipset USB adapters
Replies: 0
Views: 245

WORKAROUND; intermittent disconnects with r8152 chipset USB adapters

For some of my pi Zeros I use wired ethernet through an adapter like: https://shop.pimoroni.com/products/three-port-usb-hub-with-ethernet-and-microb-connector or https://www.amazon.co.uk/dp/B00RM3KXAU/ref=pe_3187911_189395841_TE_3p_dp_1 And I tend to get intermittent LAN dropouts (see dmesg printout...
by pootle
Mon Jun 10, 2019 7:55 am
Forum: Python
Topic: picamera & ILI9341 - change picamera encoder
Replies: 2
Views: 211

Re: picamera & ILI9341 - change picamera encoder

There is only 1 core in a pi zero, so additional processes will probably slow things down, rather than speed them up. I assume the conversion cannot keep up with frames from the camera? How far away you are from what you want. Is the process 10% too slow, or 100% too slow or worse? The solution depe...
by pootle
Thu Jun 06, 2019 6:39 am
Forum: General discussion
Topic: Python code is being executed slowly on Pi 3 B+
Replies: 14
Views: 570

Re: Python code is being executed slowly on Pi 3 B+

I'm also wondering what benefit the fuzzies bring to a reasonably well setup pid control loop. Have you tried running with just a straight pid control loop?
by pootle
Thu Jun 06, 2019 6:31 am
Forum: General discussion
Topic: Python code is being executed slowly on Pi 3 B+
Replies: 14
Views: 570

Re: Python code is being executed slowly on Pi 3 B+

I think you should be able to get a big improvement by refactoring the code, and potentially get numpy to do a lot more work per call (and fewer calls). Can you declare the numpy arrays once up front and re-use them? Can you shape the data so that the sequences like: mu_kural1 = min(mu_e_SC,mu_de_N)...
by pootle
Wed May 15, 2019 7:12 pm
Forum: Python
Topic: Running two functions simultaneously via Threading
Replies: 10
Views: 1487

Re: Running two functions simultaneously via Threading

Python will not execute 2 threads at exactly the same time - so if you use code like while time.time() < start_time: pass that thread will completely lock out all other threads. (search Python Global Interpreter Lock if you want to know more) If the code in you playaudio / recordaudio functions are ...
by pootle
Tue May 14, 2019 7:09 am
Forum: Python
Topic: Retrieving counts from an [Absolute Rotary Encoder]
Replies: 3
Views: 207

Re: Retrieving counts from an [Absolute Rotary Encoder]

Is it always the same value that is missing? If so which is the missing value?
by pootle
Fri May 10, 2019 8:29 am
Forum: Automation, sensing and robotics
Topic: Cheaper alternative to brickpi? (Connecting NXT servomotors)
Replies: 11
Views: 766

Re: Cheaper alternative to brickpi? (Connecting NXT servomotors)

I like this idea, as I have a couple of these motors. I developed techniques to drive (different) dc motors with optical encoders. A couple of things that might help: I wrote code using pigpio to process the feedback from the optical encoder. Initially enitrly in python, but I recoded a critical par...
by pootle
Wed May 08, 2019 6:15 am
Forum: General discussion
Topic: About Pi camera
Replies: 2
Views: 149

Re: About Pi camera

oh yes - from command line zoom is set using roi parameter
by pootle
Wed May 08, 2019 6:11 am
Forum: General discussion
Topic: About Pi camera
Replies: 2
Views: 149

Re: About Pi camera

How are you driving the camera? If its with python you can use zoom to crop the image you get back. There should be parameters to do it from command line as well. Also you can adjust the camera focus if it is a standar pi camera ( and most clones as well). Search for pi camera focus. Some suppliers ...
by pootle
Tue May 07, 2019 6:38 am
Forum: General discussion
Topic: Regarding stepper motor
Replies: 7
Views: 328

Re: Regarding stepper motor

I'm not going to write software for you, but this post has a basic control loop.

viewtopic.php?f=37&t=239856#p1464543
by pootle
Tue May 07, 2019 6:12 am
Forum: Automation, sensing and robotics
Topic: motor speed speed and timers (beginner)
Replies: 1
Views: 152

Re: motor speed speed and timers (beginner)

Unfortunately the raspberry pi is not infinitely fast, so your loop takes longer than the the 2 delay times (and this would be true even without the gio statements). You need to track the time and adjust your delays something like this: ticktime=.01 #for 100 per second nexttickat =time.time()+tickti...
by pootle
Mon May 06, 2019 11:41 am
Forum: Automation, sensing and robotics
Topic: Motors - What Type, How to use?
Replies: 7
Views: 555

Re: Motors - What Type, How to use?

Have you started the pigpio daemon?

Code: Select all

sudo pigpiod
by pootle
Mon May 06, 2019 11:38 am
Forum: General discussion
Topic: Regarding stepper motor
Replies: 7
Views: 328

Re: Regarding stepper motor

You seem to be setting up for 30 rpm. Is this right? With s step interval of 300 microseconds, your timing loop will drift . You should calculate the sleep time by checking the actual time against the time you want the next tick and sleep for the difference. Keep a count of the number of times the c...
by pootle
Mon May 06, 2019 11:02 am
Forum: General discussion
Topic: Regarding stepper motor
Replies: 7
Views: 328

Re: Regarding stepper motor

In the meantime.....

What speed do you want?
what speed do you get?
Does the motor step correctly or does it stall at all?
what is the stepper motor? - link to spec would be useful.
by pootle
Sat Apr 06, 2019 7:46 am
Forum: Automation, sensing and robotics
Topic: HELP - Stepper Motor and Adafruit Hat 2348
Replies: 3
Views: 242

Re: HELP - Stepper Motor and Adafruit Hat 2348

oh yes, the I2C addres is a parameter to the class constructor like this: kit = MotorKit(address=0x60) # change the address as required With the dc and stepper hat you control velocity by hy the time interval between calls to onestep: for i in range(100): kit.stepper1.onestep() time.sleep(.01) #chan...
by pootle
Sat Apr 06, 2019 7:36 am
Forum: Automation, sensing and robotics
Topic: HELP - Stepper Motor and Adafruit Hat 2348
Replies: 3
Views: 242

Re: HELP - Stepper Motor and Adafruit Hat 2348

This hat can run at most 2 stepper motors, you will need 2 of them to run 3 steppers. BUT these hat's are not a good way to control steppers - the control is very basic and they cannot drive the steppers very fast. Any breakout board with an A4988 chip (or similar) will be MUCH better than the dc / ...
by pootle
Sun Mar 31, 2019 7:25 am
Forum: General discussion
Topic: Raspberry Pi B invisible when attached to unmanaged switch [solved]
Replies: 5
Views: 245

Re: Raspberry Pi B invisible when attached to unmanaged switch

sounds like you have a duff cable.

Are all the lan ports lit up wueh you plug things together?

Can you try plugging something else in with the same cable you use with the pi?

I have connected ;pi's via many different typesof switch and never had a problem.
by pootle
Thu Mar 28, 2019 7:34 am
Forum: Automation, sensing and robotics
Topic: Is implementing stepper motor movement possible with my code?
Replies: 2
Views: 256

Re: Is implementing stepper motor movement possible with my code?

You need to put the code in code tags so the indentation is preserved. However from a quick look you can do this (as long as ypu don't want the motors to go very fast) quite easily with a couple of threads. see python threading module One thread just runs in a loop and keeps a record of the joystick...
by pootle
Thu Mar 14, 2019 6:20 pm
Forum: Python
Topic: picamera installation location varies - why?
Replies: 5
Views: 397

Re: picamera installation location varies - why?

ah! so if I apt install it, it should end in the same place - that would make life simpler...
by pootle
Tue Mar 12, 2019 10:45 pm
Forum: Python
Topic: picamera installation location varies - why?
Replies: 5
Views: 397

picamera installation location varies - why?

I'm just slightly bemused by the fact that in the gui versions of raspbian, picamera (there as part of the build) is in /usr/lib/python3/dist-packages/picamera/ and in raspbian lite (where you have to install it using pip3 or apt-get) it is in /usr/local/lib/python3.5/dist-packages/picamera/ Just in...
by pootle
Fri Mar 08, 2019 8:27 am
Forum: Networking and servers
Topic: Raspbian WiFi bounces regularly on Raspbian in console mode
Replies: 51
Views: 6882

Re: [Solved] Raspbian WiFi bounces regularly on Raspbian in console mode

meh, my network is not simple - too many interior brick walls with high iron bricks, so I have several APs in the house. These backhaul to a pfsense firewall before hitting my internet router.

The access points I know have exhibited the problem are:
  • asus RP-AC5
  • edimax 7428HCn
  • Alfa Tube 2H
by pootle
Mon Mar 04, 2019 8:38 am
Forum: Networking and servers
Topic: Raspbian WiFi bounces regularly on Raspbian in console mode
Replies: 51
Views: 6882

Re: [Solved] Raspbian WiFi bounces regularly on Raspbian in console mode

I've applied the workaround as written up by bls and it seems to work a treat. Here's a typical bit of logging from one of my pi's running stretch lite before the workaround: more /var/log/syslog | grep "carrier lost" Feb 25 06:29:41 piza dhcpcd[397]: wlan0: carrier lost Feb 25 06:37:44 piza dhcpcd[...
by pootle
Fri Mar 01, 2019 10:45 pm
Forum: Networking and servers
Topic: Raspbian WiFi bounces regularly on Raspbian in console mode
Replies: 51
Views: 6882

Re: [Solved] Raspbian WiFi bounces regularly on Raspbian in console mode

Ah! this sounds exactly the problem I'm having on Pi zero W's with raspbain lite. I'll give the workaround a runaround the block.

Go to advanced search