Go to advanced search

by picandies
Mon Oct 22, 2018 6:31 pm
Forum: General discussion
Topic: Setting up gpio using classes
Replies: 24
Views: 2256

Re: Setting up gpio using classes

I'm taking a look at the gpiozero, but there is way way too much code to even know how it is all tying together. Say I have class A and class B They both need to look at GPIO18 (name it mysignal) Should each one define mysignal (set up pin name, direction pullups, etc) in it's init? Then it is being...
by picandies
Mon Oct 22, 2018 4:33 pm
Forum: General discussion
Topic: Setting up gpio using classes
Replies: 24
Views: 2256

Setting up gpio using classes

When setting up a system there may be many sensors & other I/o for switches, leds etc. Each sensor may be in its own file, using its own class & sub functions (read volts, read rpm, set pressure, set rpm, etc) The sensor classes are imported into the main file. Some lines (pins) may be shared among ...
by picandies
Sun Oct 21, 2018 3:01 am
Forum: General discussion
Topic: Best way to commonly setup io
Replies: 3
Views: 365

Re: Best way to commonly setup io

I got rid of the sample arrangement, since it was likely wrong. What is the proper setup of the classes to use the I/O s defined such that each of the different sensor classes can use them? Some sensors will be using the same io lines. Ser clk & data will be used by almost everybody. Other lines mig...
by picandies
Sat Oct 20, 2018 11:57 pm
Forum: General discussion
Topic: solid pwm for motor
Replies: 2
Views: 312

solid pwm for motor

Hello, I need a rock-solid (hardware PWM) for precise motion control, at only 1800-1980 Hz at the pin. Really it only needs to be 50% at all times. My understanding is just using some random I/O pin for PWM may give a lot of jumping (I have seen it myself) due to creating it in software, rather than...
by picandies
Sat Oct 20, 2018 4:01 pm
Forum: General discussion
Topic: Best way to commonly setup io
Replies: 3
Views: 365

Best way to commonly setup io

Hello: I have several classes for different sensors (pressure, rpm, adc, etc)...each of these use several I/O lines, some of them are somewhat shared (ex: ser data line is used everywhere & one switch line is read both pressure & current monitor activity). Some classes are in a different file & impo...
by picandies
Sun Oct 14, 2018 5:10 pm
Forum: General discussion
Topic: cumulative time error
Replies: 1
Views: 287

cumulative time error

I need to run a function 10 times a second in tkinter. Presently I use root.after(100, update_my_readings) However, I bet after 1000000 cycles, it will be off due to cumulative error (say each was 99.83 ms). What matters is not that it is exactly 100ms each time, but that it stays in synch with the ...
by picandies
Wed Sep 26, 2018 5:25 pm
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

Re: smbus read_block_data() definition

Thank you Joan!!

I wonder how the Python lib can be poorly documented...how does everyone use it? Well, I suppose that's how it is.
by picandies
Wed Sep 26, 2018 1:58 am
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

Re: smbus read_block_data() definition

Thanks for your reply...its fine for now...but I still wonder for my rpi3 running stretch Usually the 1st place I'd look is in the horse's mouth http://www.smbus.org/specs/], it doesn't give Python implementation I originally looked around there , but no answer to my question about the command param...
by picandies
Tue Sep 25, 2018 10:54 pm
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

Re: smbus read_block_data() definition

It is pretty unlikely it actually accepts SMBus commands Its another processor I am programming, so it is whatever I program, but Iwas trying to use the mentioned function on the rpi end. I find it strange that there doesn't seem to be any readily accessable documentation on the rpi site, or any ot...
by picandies
Tue Sep 25, 2018 9:43 pm
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

Re: smbus read_block_data() definition

s32 i2c_smbus_read_block_data ( struct i2c_client * client, u8 command, u8 * values); Thanks for the reply, though I'm not sure how it makes sense...This mean you'd do the following? using the 3 parameters/arguments given, an example gotvalues = mybus.i2c_smbus_read_block_data(20, 34, [1,2,3,4]) I'...
by picandies
Tue Sep 25, 2018 7:44 pm
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

Re: smbus read_block_data() definition

Did you ask Python?

THANK YOU !!!!!...this is great...never thought of asking the rpi...I knew you could get help on Linux commands like help echo'

By the way where is this info actually defined/described in the real world (as an actual document rather then posts/comments)
by picandies
Tue Sep 25, 2018 4:17 pm
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

Re: smbus read_block_data() definition

The device specifies the number of returned bytes, not the user ...this is a standard rpi3 with stretch, using python import smbus import sys import time bus=smbus.SMBus(1) get_my_data= bus.read_block_data(WHAT EXACTLY GOES IN HERE) WHAT are these parameters , please list & describe I need to read ...
by picandies
Tue Sep 25, 2018 1:26 am
Forum: Python
Topic: smbus read_block_data() definition
Replies: 13
Views: 1969

smbus read_block_data() definition

WHERE are the parameters for this function described/defined? I need a list of exactly what the needed parameters are. These must be exactly specified in a manual somewhere. By this I mean: readings=mybus.read_block_data( parameters) ...what are the parameter(s) Also some example of using it to read...
by picandies
Sat Sep 22, 2018 6:33 pm
Forum: General discussion
Topic: Tkinter and I/O control
Replies: 4
Views: 421

Re: Tkinter and I/O control

Are there some project articles that use both the tkinter graphics as well as also handling ongoing io operations? I'd like to take a look at one or two for ideas & read about the pitfalls and things to watch out for. It seems like this would be a pretty common situation for the rpi.
by picandies
Tue Sep 18, 2018 4:35 pm
Forum: General discussion
Topic: Tkinter and I/O control
Replies: 4
Views: 421

Re: Tkinter and I/O control

The simplest way to perform "background tasks" with tkinter is to use the .after method to schedule a function periodically. Another method is to have your control inside a separate thread. Thanks, a small step in the right direction. Do you know of any good project tutorials or articles that use t...
by picandies
Tue Sep 18, 2018 8:33 am
Forum: General discussion
Topic: Tkinter and I/O control
Replies: 4
Views: 421

Tkinter and I/O control

I'm using Tkinter with some buttons, sliders and such to make adjustment of the hardware to set fwd, stop, reverse, and adjust rpm of my motors. That seems ok, a callback function can access and manipulate the io. However, I'm a bit befudddled on how the rest of the system is to be situated. For exa...
by picandies
Mon Sep 10, 2018 6:26 pm
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 1139

Re: VNC printing ---where is it?

Yep, instead of saying vnc can be used to remotely print your files, they should say , your apps can remotely print your files through the VNC connection. VNC server lets you pick File Transfer, so I was looking for similar File Print, after following the install steps.
by picandies
Sun Sep 09, 2018 6:29 am
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 1139

Re: VNC printing ---where is it?

use VNC Viewer to select File > Print WHERE is this menu at...who ever wrote it lacked clarity, though after massive searching could not find any such menu in VNC. So I had files I wanted to print, but couldn't. Later I opened the files (came up in Thonny & still couldn't print)...so it was a bit p...
by picandies
Sat Sep 08, 2018 10:36 pm
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 1139

Re: VNC printing ---where is it?

What is the link to those statements? I don't find any reference to printing in the official documentation: https://www.raspberrypi.org/documentati ... /README.md [/i] Here (bottom, VNC): https://www.raspberrypi.org/community/ To here: https://www.realvnc.com/en/raspberrypi/ Transfer files and pri...
by picandies
Sat Sep 08, 2018 6:18 pm
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 1139

Re: VNC printing ---where is it?

Then, use VNC Viewer to select File > Print remotely

I think whoever wrote this for the rpi phrased it rather poorly...this is rather misleading, since no such selection can be found anywhere in VNCviewer....I tore apart my entire computer looking for it!!!!
by picandies
Sat Sep 08, 2018 10:40 am
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 1139

VNC printing ---where is it?

Using VNC that came with my rpi...noticed this mentioned about printing , but WHERE is this file-->print button located? My file is a app.py file I'm editing in Thonny & want to print. Please provide a screen shot of it. I can't find it anywhere, either on my rpi or PC. I did install the CUPS as men...
by picandies
Sat Sep 08, 2018 9:52 am
Forum: General discussion
Topic: Glade control panel
Replies: 5
Views: 461

Re: Glade control panel

So does on anyone on the forums use glade to make projects or not??? Control some motors, a pump, leds, etc? Where are the examples? Show at least one.
by picandies
Fri Sep 07, 2018 9:18 am
Forum: General discussion
Topic: Glade control panel
Replies: 5
Views: 461

Re: Glade control panel

There is nothing special to using Glade on a raspberry pi and all the GPIO functions you are using already will still be available. Well that's nice, but how do those I/O things tie into Glade? That's the tutorial I'm looking for (aside from just drawing something up using glade). This would be a p...
by picandies
Thu Sep 06, 2018 7:58 am
Forum: General discussion
Topic: Glade control panel
Replies: 5
Views: 461

Glade control panel

I noticed the other day that Glade is now appearing as a programming option on my rpi. Looks like a cool way to make a control panel to adjust my motors (pwm IO output). Is there a good rpi tutorial using Glade to do something (blink some leds, control a motor speed, etc?). I just want some buttons ...
by picandies
Wed Aug 22, 2018 4:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: questions about read_i2c_block_data()
Replies: 1
Views: 424

Re: questions about read_i2c_block_data()

Well, I think I found the answer...Looking again, I noticed [A] vs A, and I thought I'd made a typo. But the [ ] actually means something.
[xxxx] means xxxx comes from the slave
xxxx means xxxx comes from the master

Go to advanced search