Raspberry Pi - ers, turbo?

Conachair

Guest
Joined
24 Jan 2004
Messages
5,162
Location
London
Visit site
Not the case at all. It is now done and I can start playing with it.
My point is that what should have been a trivially easy exercise (setting up wifi) was turned into something much harder than it should have been by people more interested in demonstrating their own vast knowledge than solving my problem.

Not quite. A few minutes research would have got you a wifi card which works with no fiddling. You can't really expect to get a computer with no operating system up and running without having to do a little leg work. There are plenty "how to's" on the web and youtube to help set up whatever you want to.


Well worth reading is the Rpi Verified Peripherals page, worth reading to check all sorts of add-ons before you buy. Just so when you go shopping on Amazon, eBay etc for a extended-range WiFi antenna, you get something that will work.

http://lmgtfy.com/?q=raspberry+pi+wifi+usb+
 

st599

Well-known member
Joined
9 Jan 2006
Messages
7,183
Visit site
One of the OPs mentioned openCPN. I can confirm you can compile and run this, zyGrib, xtides on tthe Pi.
 

st599

Well-known member
Joined
9 Jan 2006
Messages
7,183
Visit site
The source code download. There are no current binary downloads.

I could try to make one when Talk Talk fix my broadband.
 

Boreades

New member
Joined
8 Sep 2003
Messages
5,040
Location
Boat:Plymouth, Me:Not Boat
Visit site
The source code download. There are no current binary downloads.

I could try to make one when Talk Talk fix my broadband.

Thanks, I have got as far as the long list of OpenCPN dependencies that have to be installed first. Did that last night. I will try the OpenCPN source download tonight, if I don't get too sidetracked by trying the WiFi dongle.

Good luck with TalkTalk. We've been using them for voice and line rental for four years, but their "Customer Service" still thnks BT is providing the line rental, so TT can't supply broadband. Just about to move to an Eclipse Internet Home Bundle.
 
Last edited:

Eygthene

Member
Joined
11 Aug 2007
Messages
417
Location
Falmouth
Visit site
I've got my R Pi working, but I wanted to drive the GPIO from BASIC. I wanted to POKE the relevant code words into the appropriate registers, but quickly discovered that bwBASIC doesn't have PEEK and POKE. Is there a BASIC that will run under LINUX which will enable me to load a 32 bit register having a 32 bit Address?
 

Boreades

New member
Joined
8 Sep 2003
Messages
5,040
Location
Boat:Plymouth, Me:Not Boat
Visit site
I've got my R Pi working, but I wanted to drive the GPIO from BASIC. I wanted to POKE the relevant code words into the appropriate registers, but quickly discovered that bwBASIC doesn't have PEEK and POKE. Is there a BASIC that will run under LINUX which will enable me to load a 32 bit register having a 32 bit Address?

Here's a discussion on various languages using the GPIO WiringPi library
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=33&t=18654

Looks like C and Python are the favourites though :-(

WiringPi
 

BruceDanforth

Well-known member
Joined
13 Mar 2004
Messages
17,871
Location
Tyne and Wear
Visit site
I've got my R Pi working, but I wanted to drive the GPIO from BASIC. I wanted to POKE the relevant code words into the appropriate registers, but quickly discovered that bwBASIC doesn't have PEEK and POKE. Is there a BASIC that will run under LINUX which will enable me to load a 32 bit register having a 32 bit Address?

You need to export the gpio pins, then they exist in the file system down here:

/sys/devices/virtual/gpio


eg for pin22

$ echo 22 > /sys/class/gpio/export

then you have

/sys/devices/virtual/gpio/gpio22 for pin 22 etc:

so you can do

% cat /sys/devices/virtual/gpio/gpio22/value
0

% echo out > /sys/devices/virtual/gpio/gpio22/direction

% echo 1 > /sys/devices/virtual/gpio/gpio22/value


etc and stuff like that


so you can control the gpio from basic just open the file /sys/devices/virtual/gpio/gpio22 and read and write to your hearts content. If that isn't fast enough you'll need to do it from C++ or C

it's just standard linux stuff. I don't have a pi here to test it but the gpio will be down there somewhere in your /sys

you will need to be root


hope that helps
 

Eygthene

Member
Joined
11 Aug 2007
Messages
417
Location
Falmouth
Visit site
Boreades, 2nd apprentice, Ed Beynon.

Many thanks, all, for your kind help. It doesn't look too hopeful for my simple BASIC ambitions at present. Brandy BASIC may be a possibility which I am investigating.

I know that it would be best to learn Linux or C, but at my age I am still hoping to avoid having to do that. Thanks for your help with the exporting suggestions Ed.
 

BruceDanforth

Well-known member
Joined
13 Mar 2004
Messages
17,871
Location
Tyne and Wear
Visit site
Boreades, 2nd apprentice, Ed Beynon.

Many thanks, all, for your kind help. It doesn't look too hopeful for my simple BASIC ambitions at present. Brandy BASIC may be a possibility which I am investigating.

I know that it would be best to learn Linux or C, but at my age I am still hoping to avoid having to do that. Thanks for your help with the exporting suggestions Ed.

You can control the gpio's from basic

use the OPEN command to open the file " /sys/devices/virtual/gpio/gpio22/direction" for example for pin 22 after you've exported it

write an in or out there to set the direction

open the file " /sys/devices/virtual/gpio/gpio22/value" and either read from it or write ones or zeros to it.

it will work....


Java would be easier to learn than C
 

cluso99

New member
Joined
3 Oct 2012
Messages
1
Location
Sydney Australia or on the high seas
www.bluemagic.biz
R-Pi & MK802 ideas

Very interesting ideas. I am a bit limited with time atm.

I have also recently sourced an MK802 II which has wifi inbuilt instead of ethernet ($51). It has 1GB and runs an Allwinner A10 (A8) processor at 1GHz so it should be faster than the RPi.

I am interested in being able to monitor and control much of my vessel using a wifi phone or tablet, and using the MK802 or RPi as the main host.

So, I will be following this thread with interest shortly :)
 

Eygthene

Member
Joined
11 Aug 2007
Messages
417
Location
Falmouth
Visit site
Ed, that sounds a lot easier than I was expecting and as you say, would allow me to work around the problem in my old-fashioned way with BASIC. I haven't quite grasped how I can operate the OPEN command yet (only used OPEN before to access files of BASIC or of data), but I am looking and learning.

When the penny drops, I will put some code together and may I run it past you via a PM?
 

greenalien

New member
Joined
11 Jun 2010
Messages
700
Location
Southampton
Visit site
My point is that what should have been a trivially easy exercise (setting up wifi) was turned into something much harder than it should have been by people more interested in demonstrating their own vast knowledge than solving my problem.

So now your problem has been solved, with the help of the online community. Sometimes you have to dig a little, and maybe some assumptions were made about your level of knowledge and ability, but that doesn't mean people weren't trying to help you. Maybe you were the first person with that exact problem. Have you posted step-by-step details of your solution on the 'net to help the next person with the same difficulty? That's how it works...
 

BruceDanforth

Well-known member
Joined
13 Mar 2004
Messages
17,871
Location
Tyne and Wear
Visit site
Ed, that sounds a lot easier than I was expecting and as you say, would allow me to work around the problem in my old-fashioned way with BASIC. I haven't quite grasped how I can operate the OPEN command yet (only used OPEN before to access files of BASIC or of data), but I am looking and learning.

When the penny drops, I will put some code together and may I run it past you via a PM?

Well sure. I'll have a look. It's not a language really used in industry though. If you read from a file for a pin you have set to in you will get a 1 or a zero. Similarly if you have set a pin to out then writing a 1 or zero to the file will set the pin high or low.
 

st599

Well-known member
Joined
9 Jan 2006
Messages
7,183
Visit site
Ed, that sounds a lot easier than I was expecting and as you say, would allow me to work around the problem in my old-fashioned way with BASIC. I haven't quite grasped how I can operate the OPEN command yet (only used OPEN before to access files of BASIC or of data), but I am looking and learning.

When the penny drops, I will put some code together and may I run it past you via a PM?

Everything in Linux appears as a file.

You open the I/O pins direction file and write either in or out to it.

Then you open the I/O pins value file and either read from or write to the file.
 

Eygthene

Member
Joined
11 Aug 2007
Messages
417
Location
Falmouth
Visit site
ED and st599. Many thanks for your helpful advice. I have done my best to get to grips with these ideas and I have written some code in LINUX for exporting the GPIO pins. Then I have switched to BASIC to open the direction files for these pins and set up some inputs and some outputs. Finally I have opened the value files read the 1s and 0s in these and put together a simple logic test to execute a pattern of outputs when a certain combination of inputs is seen.

I have sent a copy of this code to Ed to see if it looks anywhere near OK. If so I have to get my R-Pi and the attached Input/Output circuits board back from a pal now and try the code out.
 

Boreades

New member
Joined
8 Sep 2003
Messages
5,040
Location
Boat:Plymouth, Me:Not Boat
Visit site
Thank you all for illustrating my point so well. The typical response you get when making any query or comment about Linux related Raspberry Pi problems is usually one of condescension. Unix experts have always liked to think of themselves as "gurus" throwing minimal scraps of light on those floundering in the dark. I think this is what will rapidly kill off the Rasberry Pi. It was promoted as something that will get kids back into programming. Somewhere in there is almost certainly a little jewel that could interest kids, but 99% of them won't be bothered to dig through the steaming cow pat that is the Linux operating system to find it!

Well, learning anything new does hurt the head a bit. Meanwhile, I'm glad to report a British Success Story. Raspberry Pi sales have topped 1.2 million and are climbing rapidly. The bulk of Raspberry Pi production moved from China last September to one of Sony’s factories in Wales. The U.K. plant has now produced more than 500,000th units in a little over six months.

Would the Pi be a good building-block for (e.g.) Angus' YAPPs?
 

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,590
Location
Up some Hebridean loch
Visit site
Well, learning anything new does hurt the head a bit. Meanwhile, I'm glad to report a British Success Story. Raspberry Pi sales have topped 1.2 million and are climbing rapidly. The bulk of Raspberry Pi production moved from China last September to one of Sony’s factories in Wales. The U.K. plant has now produced more than 500,000th units in a little over six months.

Would the Pi be a good building-block for (e.g.) Angus' YAPPs?

I'm not sure the Raspberry Pi lot could keep up with demand for YAPPs. For the last one the expectation was that 10 would be produced, but in the end there were 12.
 
Top