Go to advanced search

by PeterO
Mon Apr 22, 2019 7:25 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1931
Views: 73196

Re: Why Avoid BASIC on RPi?

ScriptBasic wrote:
Mon Apr 22, 2019 7:16 pm
I think the focus here is scripting languages that can run on the RPi.
You wish :-)

PeterO
by PeterO
Fri Apr 19, 2019 6:02 am
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

Now we can work out that your GREEN leds (I though the discussion was about BLUE ones but hey-ho) is passing (3.28-2.54)/1000 = 0.74mA .

PeterO
by PeterO
Thu Apr 18, 2019 6:37 pm
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

A LED is a special case. A LED must have a current limiting resistor... So as for Ohms law think of a LED and the resistor as one device. Be aware that you can get LEDs with built in resistors designed to run off a particular voltage. In a board I built which has 96 LEDs on it, these saved space an...
by PeterO
Thu Apr 18, 2019 5:09 pm
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

You said it was bright enough with a 220Ω in series ? What was the voltage across the LED when you had a 220Ω resistor in series with it ? PeterO It's at home - I'm at work - I can check it later. I didn't measure it. It is in series. GPIO to resistor, resistor to leg of LED, other leg of LED to GN...
by PeterO
Thu Apr 18, 2019 3:16 pm
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

The RPi 3.3V GPIO. The LED is blue 20mA, 3.0V to 3.2V (forward voltage based on previous reply). Also based on previous reply and calculator link it would be source voltage less forward voltage. So in this case 3.3V - 3.0V = 0.3V to 3.3V - 3.2V = 0.1V. Given 0.3V and 0.1V with 20mA R = 0.3V / 0.02A...
by PeterO
Thu Apr 18, 2019 2:42 pm
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

Maybe one thing here that is throwing me off a bit is these LEDs say they are 20mA - already over the max 16mA GPIO - but now understanding the forward voltage subtraction from GPIO voltage - that calculates 5Ω to 15Ω resistors (lets say a 10Ω middle ground). What calculation are you doing to get 5...
by PeterO
Thu Apr 18, 2019 2:38 pm
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

drgeoff wrote:
Thu Apr 18, 2019 1:59 pm
Figure 2 on the page i linked to in my first post in this thread has typical curves for 8 different LED colours.
Didn't read the whole thread because there was so much wrong info being given !

PeterO
by PeterO
Thu Apr 18, 2019 2:29 pm
Forum: Python
Topic: Is anyone using GTK3 via PyGObject ?
Replies: 4
Views: 63

Re: Is anyone using GTK3 via PyGObject ?

The offending code is in /usr/lib/python3/dist-packages/gi/overrides/Gtk.py

_builder_connect_callback (line 102 on my installation) seems to do the wrong thing to me...

PeterO
by PeterO
Thu Apr 18, 2019 1:34 pm
Forum: Beginners
Topic: How to calculate resistors...
Replies: 50
Views: 804

Re: How to calculate resistors...

See the attached graph which shows a typical red led's voltage/current characteristic. It shows that at 10mA the led will have ~2.1V across it. So that leaves 3.3V - 2.1V = 1.2V to drop across the resistor. Apply ohms law to get the resistor value : R = V / I and get R = 1.2V / 10mA = 120Ω Full data...
by PeterO
Thu Apr 18, 2019 12:52 pm
Forum: Python
Topic: Is anyone using GTK3 via PyGObject ?
Replies: 4
Views: 63

Re: Is anyone using GTK3 via PyGObject ?

No, I referred to it as "userdata" because that what it is labeled as in the Glade GUI, and that is what it is called in all the C API documentation. But no that's not the problem. The oddity is that if userdata is set, the value replaces the widget as the first (or second if the handler is an objec...
by PeterO
Thu Apr 18, 2019 11:53 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1931
Views: 73196

Re: Why Avoid BASIC on RPi?

Does it really matter what happened 70 pages ago ?
PeterO
by PeterO
Thu Apr 18, 2019 10:26 am
Forum: Python
Topic: Is anyone using GTK3 via PyGObject ?
Replies: 4
Views: 63

Is anyone using GTK3 via PyGObject ?

I've started a project with Python and GTK and I've run into an oddity with the Gtk.Builder behaviour when a signal has "userdata" defined in the glade file.

I won't give more details yet until someone responds that they know what I'm talking about :lol:

PeterO
by PeterO
Thu Apr 18, 2019 8:05 am
Forum: The MagPi
Topic: Errors in An Introduction to C & GUI Programming.
Replies: 13
Views: 373

Re: Errors in An Introduction to C & GUI Programming.

We are going to laugh our bits off in the office when Simon gets back. The return value from main is a long running saga. Suffice to say, this is not a technical reference, it's a guide for beginners. Not for those of a more pedantic persuasion. Are you saying that "style comes before accuracy" ? T...
by PeterO
Thu Apr 18, 2019 6:49 am
Forum: The MagPi
Topic: Errors in An Introduction to C & GUI Programming.
Replies: 13
Views: 373

Re: Errors in An Introduction to C & GUI Programming.

Far bigger issue for me is odd decision to cover on GTK2 rather than GTK3 ! GTK3 has been stable (at 3.22) for nearly three years now, so any arguments about GTK3 API stability and backwards compatibility between releases are bogus. :roll: I thought I was late making the jump from GTK2 to GTK3 two y...
by PeterO
Wed Apr 17, 2019 9:54 am
Forum: Beginners
Topic: 2 differents sounds in rasbian
Replies: 3
Views: 87

Re: 2 differents sounds in rasbian

by PeterO
Mon Apr 15, 2019 7:02 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1154

Re: Introduction to BBC BASIC

ScriptBasic wrote:
Sun Apr 14, 2019 7:12 pm
Think of the Raspberry BASIC forum as an extension module for forums that don't get it.
Absolutely NOT ! If you are going to run a forum on a subject, then it should be the first point of call not the last hope for the desperate !

PeterO
by PeterO
Mon Apr 15, 2019 7:00 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1931
Views: 73196

Re: Why Avoid BASIC on RPi?

Frustration with how complicated Linux, systemd and the GNU toolchain have become is likely one of the original motivations for this thread. But lets not fool ourselves, the types of people posting to this thread are not the originally intended target audience for the Pi. That's why it's in "Off To...
by PeterO
Sun Apr 14, 2019 6:46 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1154

Re: Introduction to BBC BASIC

Please don't cross posts from other forums, we've had quite a few posts on basic recently, we don't need this as well. How about creating a BASIC board so folks don't have to link to forums that do give BASIC some respect? Why ? You made a big fuss about making your own forum, so use that ! PeterO
by PeterO
Fri Apr 12, 2019 9:21 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1931
Views: 73196

Re: Why Avoid BASIC on RPi?

ScriptBasic wrote:
Fri Apr 12, 2019 9:17 pm
What is the significance of "t" ?
t.bas is the include file for the C (t)ools extension module.
Then call it tools.bas not some meaningless single letter name.

PeterO
by PeterO
Fri Apr 12, 2019 9:12 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1931
Views: 73196

Re: Why Avoid BASIC on RPi?

ScriptBasic MD5 IMPORT t.bas What is the significance of "t" ? m = t::MD5("My Name is John") FOR i = 1 TO LEN(m) PRINT HEX(ASC(MID(m, i, 1))) NEXT PRINT Ugly code to print out the result.... Python solutions are much cleaner import hashlib hash = hashlib.md5() hash.update(b"My Name is John") print(...
by PeterO
Fri Apr 12, 2019 7:30 am
Forum: Other programming languages
Topic: ScriptBasic
Replies: 157
Views: 2810

Re: ScriptBasic

WHY SHALL I USE RaspEX? Eight Operating Systems are recommended by Raspberrypi.org. Among them Raspbian. RaspEX is faster, more useful and more fun to use. (In my opinion). One member at raspex.exton.se thought that running RaspEX was like running Raspberry on “steroids“. If you run Build 181015/18...
by PeterO
Tue Apr 09, 2019 2:12 pm
Forum: Advanced users
Topic: 'nonempty' mount option
Replies: 3
Views: 280

Re: 'nonempty' mount option

Is the mount point in fact not empty ? That seems to be what it is complaining about.

PeterO
by PeterO
Mon Apr 08, 2019 6:57 am
Forum: Python
Topic: So where's Tkinter then?
Replies: 7
Views: 21738

Re: So where's Tkinter then?

epicdabber101 wrote:
Sun Apr 07, 2019 9:25 pm
The

Code: Select all

sudo apt-get install python-tk
command didn't work with my Pi. I need help :(
This thread is 7 years old ! Try starting a new thread for new problems....
PeterO
by PeterO
Sun Apr 07, 2019 7:32 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1931
Views: 73196

Re: Why Avoid BASIC on RPi?

ScriptBasic wrote:
Sun Apr 07, 2019 7:20 pm
Python may only be 9 MB to load but start including packages to get it to do anything useful and the truth unfolds.
Indeed, there are lots of useful packages that you can use to help you do useful things in Python.... ;)

PeterO
by PeterO
Fri Apr 05, 2019 11:47 pm
Forum: Troubleshooting
Topic: GUI opening on the server instead of on the client side...
Replies: 14
Views: 259

Re: GUI opening on the server instead of on the client side...

FYI on my MINT-19 machine X11Forwarding is set to "yes" and ssh -X works as expected with X applications rendering on the local machine.

PeterO

Go to advanced search