Go to advanced search

by RogerW
Fri Nov 27, 2015 11:53 am
Forum: General discussion
Topic: WiFi dongle for Pi Zero
Replies: 8
Views: 1523

WiFi dongle for Pi Zero

Given that the Pi Zero looks perfect for low cost headless applications does anyone supply a WiFi dongle that plugs directly into the mini USB port? I know there are adapters but they add cost (although not much) and more importantly take up space. I have in mind to put temperature sensors in severa...
by RogerW
Wed Nov 25, 2015 10:08 am
Forum: Python
Topic: Scrolling graph using tkinter
Replies: 7
Views: 2488

Re: Scrolling graph using tkinter

Sorry - I just found out that the code in my reply is out of date.
If you look at
https://github.com/RogerWoollett/PyView

the graph.py there has a Y axis as well.

You might find PyView of interest. It has scrolling views for memory and cpu usage.
by RogerW
Wed Nov 25, 2015 9:52 am
Forum: Python
Topic: Scrolling graph using tkinter
Replies: 7
Views: 2488

Re: Scrolling graph using tkinter

I am afraid I did not get much further. I did add an X axis with ticks but that is all. # trygraph.py # test program to try out the graph class # written by Roger Woollett from sys import version_info if version_info[0] < 3: import Tkinter as tk else: import tkinter as tk from graph import ScrollGra...
by RogerW
Tue Nov 24, 2015 9:32 am
Forum: Troubleshooting
Topic: No booting if HDMI cable is connected before of power supply
Replies: 13
Views: 1693

Re: No booting if HDMI cable is connected before of power su

What sort of screen are you using? I think it is possible for the pi to take power from the HDMI cable but I suspect your screen cannot supply enough current. I don't know of a solution but perhaps someone else can suggest one.
by RogerW
Sun Nov 22, 2015 5:46 pm
Forum: General discussion
Topic: Building a GUI
Replies: 18
Views: 5316

Re: Building a GUI

You can do everything on the Pi. Python comes with a simple IDE called Idle. I prefer to use geany but you may want to look at other editors/IDEs. My preference is to use Eclipse on a PC and then transfer the file but that is just my way of doing things. There are two versions of python comonly in u...
by RogerW
Wed Nov 18, 2015 4:12 pm
Forum: Other projects
Topic: University Design Project Prototype
Replies: 16
Views: 2050

Re: University Design Project Prototype

The RPi cameras are great but you can only connect one to a Pi - it has a single reserved connector.
by RogerW
Wed Nov 18, 2015 3:01 pm
Forum: General discussion
Topic: xmas present
Replies: 2
Views: 449

Re: xmas present

Yes do look at the link suggested. From my experience you will need: A Pi2B - the latest version of Raspberry pi A power supply - get an official RPi one unless you are certain you have a good quality 2Amp USB supply and cable. An 8GB micro SD card. If you do not get one with NOOBS already installed...
by RogerW
Wed Nov 18, 2015 2:44 pm
Forum: Other projects
Topic: University Design Project Prototype
Replies: 16
Views: 2050

Re: University Design Project Prototype

Sounds like RPi is the way to go! What you mentioned above was the assumption I had also. Do you think an A+ RPi would cut it? It's mega thin so thought it would be better than one of the bigger ones that's got more RAM. You show two cameras - how would you connect them? I suspect you would use USB...
by RogerW
Wed Nov 18, 2015 9:17 am
Forum: Other projects
Topic: University Design Project Prototype
Replies: 16
Views: 2050

Re: University Design Project Prototype

I would go for a Raspberry Pi programmed using python until you can prove this will not work. Arduinos (except some of the newer and more expensive ones) are straight microcontrollers. That means there is no operating system support - you have to do everything yourself. They are good for real time w...
by RogerW
Tue Nov 17, 2015 5:36 pm
Forum: Python
Topic: how to do two tasks at the same time
Replies: 2
Views: 2214

Re: how to do two tasks at the same time

One possible way is to establish a second thread. The threading import library contains a Thread class which you can inherit and have that object transmit the picture. You will have to establish a mechanism to tell the thread what to send - a queue object is one way to do this. The main thread puts ...
by RogerW
Tue Nov 17, 2015 4:40 pm
Forum: General discussion
Topic: Yet another Servo Question
Replies: 21
Views: 2171

Re: Yet another Servo Question

Your diagram appears to show the servo connected to GPIO 18 not 25. Is this correct?
by RogerW
Mon Nov 16, 2015 12:28 pm
Forum: Python
Topic: Fixed Decimal Places
Replies: 4
Views: 1300

Re: Fixed Decimal Places

if x contains the number
s = '{:0.3f}'.format(x)
will create a string s containing the number formatted with 3 decimal places
by RogerW
Thu Nov 12, 2015 4:18 pm
Forum: Python
Topic: get access to a class object from another class
Replies: 11
Views: 3193

Re: get access to a class object from another class

I have done a bit more research. I don't think you can create two Tk objects in the way that your code suggests. You need to call the mainloop function and that will not return until the program exits. However if you really want two separate windows you can do that using a Toplevel widget. In this c...
by RogerW
Thu Nov 12, 2015 3:09 pm
Forum: Python
Topic: get access to a class object from another class
Replies: 11
Views: 3193

Re: get access to a class object from another class

thank you, i only get one frame instead of two different (windows) when i start the code ? Conventailly most apps show their data like that. The structure is: A main window which has the title bar and possibly a menu. The remaining portion of this window is sometimes referred to as the "client area...
by RogerW
Thu Nov 12, 2015 1:52 pm
Forum: Python
Topic: get access to a class object from another class
Replies: 11
Views: 3193

Re: get access to a class object from another class

I suggest you need to do more to understand how code works. In particular if you are using tkinter you should try to understand inheritance. Cut and paste will get you only so far. This code shows one way to get one object to call a function in a different object. As you are using python 2.7 you wil...
by RogerW
Thu Nov 05, 2015 2:12 pm
Forum: Automation, sensing and robotics
Topic: GPIO expander limit
Replies: 3
Views: 1048

Re: GPIO expander limit

You can connect quite a few MCP23017 devices to a raspberry pi. They are I2C devices and a single bus can support 8 devices - each with 16 GPIO pins. The original Pis had 26 pin headers and had effectively two buses using the two chip select pins CE0 and CE1. More recent Pis with 40 pin headers have...
by RogerW
Wed Oct 21, 2015 3:39 pm
Forum: Python
Topic: Python tkinter error
Replies: 1
Views: 815

Re: Python tkinter error

The immediate problem is that you are trying to create a Label in your menu1 class but that class is not a tkinter widget. You should probably make menu1 inherit Frame.

You do not need the line:
import tkinter - the line above has already done that.
by RogerW
Mon Oct 19, 2015 5:27 pm
Forum: C/C++
Topic: C++
Replies: 28
Views: 4204

Re: C++

C++ grew out of C. In the early days the C++ compiler generated C code which was then compiled by the C compiler. C++ is an object oriented language whereas C is procedural. Because of the way C++ has developed the C language is an almost complete subset of C++. For most purposes a C program can be ...
by RogerW
Mon Oct 12, 2015 8:34 am
Forum: Python
Topic: [newbie] advice needed on code
Replies: 10
Views: 1892

Re: [newbie] advice needed on code

Dear Roger, I noticed a small problem with your program, pressing x does not seem to quit the program. In fact I'd like it to stop when pressing CTRL-c but that doesn't seem to work neither. Do you have any idea what could cause this behavior? kind regards, Jens I have tried to reproduce your probl...
by RogerW
Sun Oct 11, 2015 4:16 pm
Forum: Python
Topic: [newbie] advice needed on code
Replies: 10
Views: 1892

Re: [newbie] advice needed on code

it worked fine, thanks a lot for helping me. I will now try to add the other three faders like in the original code. kind regards, Jens p.s. I still wonder whether an optimization of the original code in a non object oriented way is also possible. It is certainly possible to use a non object orient...
by RogerW
Tue Oct 06, 2015 3:49 pm
Forum: Troubleshooting
Topic: Geany on Jessie [solved]
Replies: 3
Views: 855

Re: Geany on Jessie

Have you tried the main menu editor? It is under preferences on the start menu. I found it very slow to respond and it took a few attempts to get geany into the programming menu but it can be done.
by RogerW
Tue Oct 06, 2015 8:18 am
Forum: Python
Topic: ImportError: No module named RPIO
Replies: 24
Views: 9995

Re: ImportError: No module named RPIO

Unless something has changed quite recently the PWM functionality of RPIO does not work on the Pi2. If that is still the case you either need to use an alternative for the servo code or find an old model Pi. PWM works on Pi2 at least some of the time. The code I put in this thread https://www.raspb...
by RogerW
Mon Oct 05, 2015 2:44 pm
Forum: C/C++
Topic: qtcreator on jessie
Replies: 18
Views: 15353

Re: qtcreator on jessie

Tools/Options/Build&Run/Kits
Then click on Desktop(default)
find Compiler and click Manage button
Clock Add and select GCC

Having done all this I can compile. However this is not saved when you close QtCteator.

Does anyone know how to get it to save?
by RogerW
Sat Oct 03, 2015 6:37 pm
Forum: C/C++
Topic: qtcreator on jessie
Replies: 18
Views: 15353

Re: qtcreator on jessie

DougieLawson wrote:
RogerW wrote:
fruitoftheloom wrote: TY :D
?
It's an internet abbreviation for "thank you" because Fruity is missing the vowel keys on his keyboard.
Just put it down to old age.
by RogerW
Sat Oct 03, 2015 6:17 pm
Forum: C/C++
Topic: qtcreator on jessie
Replies: 18
Views: 15353

Re: qtcreator on jessie

fruitoftheloom wrote: TY :D
?

Go to advanced search