Go to advanced search

by scotty101
Tue Mar 19, 2019 2:30 pm
Forum: General discussion
Topic: multiple displays
Replies: 3
Views: 174

Re: multiple displays

It is possible.

You can share all the data pins between multiple displays but have each enable pin connected to a different GPIO. This will allow your code to enable a specific display, update the next and then move on to the next screen.
by scotty101
Mon Mar 18, 2019 5:19 pm
Forum: Python
Topic: sorting list
Replies: 7
Views: 355

Re: sorting list

When I put False as the value for sort_num I get [a: 4, b: 3, c: 2, d: 1] . How come it doesn't sort? Are you setting all of the "sort_num" values to False or just one? I suspect that it is trying to compare a string with a number and getting confused. You need to apply the same less than compariso...
by scotty101
Mon Mar 18, 2019 2:45 pm
Forum: Python
Topic: Pitch, roll-raspberry pi; python
Replies: 1
Views: 505

Re: Pitch, roll-raspberry pi; python

Is there a question? Or are you just posting your code?
by scotty101
Mon Mar 18, 2019 1:47 pm
Forum: Python
Topic: Changing the colour of a tkinter button
Replies: 13
Views: 778

Re: Changing the colour of a tkinter button

You need to use lambda which will allow you to have each button call the same function but pass a different argument to the function. from tkinter import * import time def ProgramTest(day): print("You clicked on {}".format(day)) root = Tk() btnFramedays = Frame(root) btnFramedays.grid() dayy = time....
by scotty101
Thu Mar 14, 2019 8:20 am
Forum: C/C++
Topic: Reading Square Wave from ATmega328p
Replies: 3
Views: 383

Re: Reading Square Wave from ATmega328p

Using PiScope would probably be the easiest way to measure the frequency.

http://abyz.me.uk/rpi/pigpio/piscope.html
by scotty101
Wed Mar 13, 2019 9:28 am
Forum: Python
Topic: Python Tkinter GPIO User Interface
Replies: 26
Views: 34209

Re: Python Tkinter GPIO User Interface

Happy to help on this forum (but not via reddit). Post a new topic with Tkinter in the title and I'll no doubt find it.
by scotty101
Tue Mar 12, 2019 8:49 am
Forum: Python
Topic: Multiple button control
Replies: 8
Views: 456

Re: Multiple button control

You will probably want to set a "bounce_time" for the buttons if you want the same action to turn the button on and off. Mechanical buttons tend to bounce so that one button press is actually closing the electrical contacts twice (or more) times. Adding a bounce time will hide more than one button p...
by scotty101
Mon Mar 11, 2019 5:48 pm
Forum: Python
Topic: Multiple button control
Replies: 8
Views: 456

Re: Multiple button control

Have you read the gpiozero documentation? https://gpiozero.readthedocs.io/en/stable/recipes.html It's really quite helpful. From that page from gpiozero import Button button = Button(2) while True: if button.is_pressed: print("Button is pressed") else: print("Button is not pressed") Can be modified ...
by scotty101
Mon Mar 11, 2019 4:45 pm
Forum: Assistive technology and accessibility
Topic: Touchchat style app for a touchscreen using a pi
Replies: 3
Views: 1498

Re: Touchchat style app for a touchscreen using a pi

Are you looking for an existing App or are you looking for help to write one yourself?

I seem to recall a similar project before but can't find it.
by scotty101
Mon Mar 11, 2019 4:38 pm
Forum: Automation, sensing and robotics
Topic: Mouse click action
Replies: 8
Views: 588

Re: Mouse click action

Not particularly easy with just a mouse. Would you consider using a button connected to the GPIO pins instead? Reading a mouse button without a GUI framework is no doubt possible but not trivial. Most existing "MouseListener" libraries will only work if your mouse pointer clicks on a GUI or a specif...
by scotty101
Mon Mar 11, 2019 4:35 pm
Forum: Python
Topic: While loops and if statements...
Replies: 4
Views: 264

Re: While loops and if statements...

Here is an example of storing the current time and then performing an action 10 seconds later. import time lastUpdate = time.time() timerRunning = True while True: if timerRunning: if time.time() > lastUpdate + 10: print("Timer Elapsed") timerRunning = False time.sleep(0.1) Once the code is run, not...
by scotty101
Mon Mar 11, 2019 1:18 pm
Forum: Python
Topic: While loops and if statements...
Replies: 4
Views: 264

Re: While loops and if statements...

Don't use a sleep(10) to wait to return to the main image. Instead record the current time when an RFID token is successfully read. Then in the main loop compare that recorded time with the current time. If the difference between the two is 10 seconds then return to the main image. (Also what joan s...
by scotty101
Mon Mar 11, 2019 12:31 pm
Forum: Automation, sensing and robotics
Topic: Mouse click action
Replies: 8
Views: 588

Re: Mouse click action

Doesn't have to be a Python script at all. You can do it with Java too.

Why not add a simple Java GUI that calls your algorithm when you click on a button?
by scotty101
Thu Mar 07, 2019 9:19 pm
Forum: Advanced users
Topic: AWD 4 motors robot
Replies: 10
Views: 337

Re: AWD 4 motors robot

Scotty, Last question I believe, So since I will have 4 motors, I will need 2 diablos. This will complete my 4 motor wheel design. However since there is 2 different micro controllers. How can I control all 4 wheels on one transmitter? Any ideas? please advise, bullengineer You connect your Raspber...
by scotty101
Thu Mar 07, 2019 9:16 pm
Forum: Advanced users
Topic: AWD 4 motors robot
Replies: 10
Views: 337

Re: AWD 4 motors robot

Scotty, Last question I believe, So since I will have 4 motors, I will need 2 diablos. This will complete my 4 motor wheel design. However since there is 2 different micro controllers. How can I control all 4 wheels on one transmitter? Any ideas? please advise, bullengineer What about a micro-contr...
by scotty101
Thu Mar 07, 2019 6:02 pm
Forum: Advanced users
Topic: AWD 4 motors robot
Replies: 10
Views: 337

Re: AWD 4 motors robot

I don't know anything about what motors you might use. I've never used anything as large as you are suggesting.

A single Diabalo can independently control 2 DC motors. Both motors can go at different speeds or different directions.
by scotty101
Thu Mar 07, 2019 4:04 pm
Forum: Advanced users
Topic: AWD 4 motors robot
Replies: 10
Views: 337

Re: AWD 4 motors robot

Thanks Scotty for your fast response. Here's the thing, I don't have motors picked out yet. I want them to be able to output ~450W. Any suggestions that the diablo would be compatiable with? Also, what kind of H-bridge and microcontroller do I need? Any thing else you can think of? The Diablo conta...
by scotty101
Thu Mar 07, 2019 3:40 pm
Forum: Advanced users
Topic: AWD 4 motors robot
Replies: 10
Views: 337

Re: AWD 4 motors robot

Beefy motors! What voltage do they run on?

You'll need something like the Diablo from PiBorg
https://www.piborg.org/motor-control-1135/diablo

It can deal with 55A at 40V. Only provides 2 channels but they are stackable.
by scotty101
Thu Mar 07, 2019 1:17 pm
Forum: Automation, sensing and robotics
Topic: IMU project
Replies: 2
Views: 232

Re: IMU project

I am currently doing an inertial navigation project at school, which is consisting of an Arduino transmitting MPU9250 data to a raspberry pi via Xbee PRO. By school do you mean a school for people under 18 years old? Inertial Navigation is not a trivial project and you're already making it more com...
by scotty101
Thu Mar 07, 2019 10:42 am
Forum: Compute Module
Topic: Information on how to use and integrate a Pi3 Compute module
Replies: 2
Views: 267

Re: Information on how to use and integrate a Pi3 Compute module

The Compute Module is not intended for beginners. It is a cutdown Pi that only has the very basic Pi components on it. The intention is that the experienced engineer develops their own "carrier board" for the compute module which has any necessary peripherals on it. How are your PCB design skills?
by scotty101
Thu Mar 07, 2019 9:52 am
Forum: Camera board
Topic: Is Object/Colour detection possible?
Replies: 1
Views: 283

Re: Is Object/Colour detection possible?

It is perfectly possible, if not a beginners project. If the items have a high colour contrast to the background it should be very simple to use OpenCV to detect these or even just compare the photo of the empty basket to one that contains items. Buy the latest Pi (Pi 3B+) and offical power supply a...
by scotty101
Thu Mar 07, 2019 9:46 am
Forum: Python
Topic: @property
Replies: 7
Views: 424

Re: @property

rpiboy wrote:
Thu Mar 07, 2019 2:47 am
Why do you put

Code: Select all

self._foo
instead of

Code: Select all

self.foo
Convention.
Unlike other languages python doesn't have public/private properties so to indicate which properties the user of the class should NOT make use of externally, the convention is to begin them with an underscore.
by scotty101
Wed Mar 06, 2019 9:39 am
Forum: General discussion
Topic: monitor the frequency of a sump pump
Replies: 1
Views: 74

Re: monitor the frequency of a sump pump

Depends on the sump pump and its operating voltage.

Generally speaking, connecting a suitable relay/contactor's coil across the motor will close the relay's contacts when the pump is turned on. You can use the relays contacts to connect to the Pi as any normal switch.
by scotty101
Tue Mar 05, 2019 10:12 am
Forum: General discussion
Topic: How to get 24 volt input signal
Replies: 18
Views: 641

Re: How to get 24 volt input signal

Basic circuit looks good but you haven't given the values of R1 and R2 so I can't comment on that aspect.

I'd suggest prototyping the circuit before you connect it to the Pi and connect a multi meter (or better a scope) in its place.
by scotty101
Mon Mar 04, 2019 1:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Learning I2C on Python, can't figure this out.
Replies: 4
Views: 232

Re: Learning I2C on Python, can't figure this out.

the format of which depends on what the Pi is communicating with? Yep depends massively. Each I2C device will have an address but different manufacturers have different ways to send/receive data. This device has a single control byte but more complex devices will have a more complex command structu...

Go to advanced search