Show Posts
Pages: [1] 2 3 ... 27
1  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 08, 2013, 04:44:56 pm
liudr, it looks like you are doing well. I think you will find the Pi is a good co-product with Arduino. I'm glad you decided to get one.
2  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 07, 2013, 10:29:17 am
Chagrin, thanks for providing the Windows methods for interacting with the Pi. I have a Windows partition on my Mac but tend not to use it when working with the Pi.
3  Community / Bar Sport / Re: Your latest purchase on: June 07, 2013, 09:42:47 am
150W PV panel, Morningstar MPPT charge controller, Exeltech inverter, 100Ah deep discharge AGM battery, Anderson Powerpoles + crimper, 10AWG zip cord.

Outfitting the RV to do a little boon docking in the Big Bend area in July.
4  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 07, 2013, 07:36:11 am
I forgot how easy it is to ssh to a unix machine. I just hooked up pi to my router and power supply and there it is, showing up on the router connected device. I just logged on to it. I will explore ways to get x server client (right term?) so I can see some graphics. I am installing cygwin on my pc.

First order of business is to install some packages now that it has internet connection.

If I start a session on the Mac like this:
Code:
ssh -X 10.0.1.203 -l pi
then applications with graphic content run in an X11 window.

Sounds like you are well on your way. Things will start to make sense now that you actually have a Pi up and running. Go ahead and install the Arduino IDE. It runs amazingly fast on the Pi.

And have fun!
5  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 06, 2013, 07:04:08 pm
I am thinking that with the PI being a computer, I should be able to develop c project code on a Linux PC, then move the source code to pi and compile. Correct? Maybe install Debian on a PC?

I will pick up the book from my university library and possibly a python book too. The python code Papa G pointed to seems pretty to use although I am not used to the syntax.

I do all my development right on the Pi. I open a terminal window and ssh into the Pi. Actually, I edit my code on the Mac in BBEdit which connects to the Pi through sftp so the files are already on the pi. Saves a lot of time moving stuff back and forth. There's probably a PC equivalent of that.
6  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 06, 2013, 08:32:44 am
Thanks Papa G and Chagrin! I have a strange feeling that lowest level fits me well. I have a programmer's mind so trying to do scripting will make my head explode. I don't like anything that is not strict with data types and can't stand the "arbitrary" syntax of perl and JavaScript. Learned in college and forgot both. Now relearned a bit JavaScript. Beej's guide seems to fit me, with the gcc involved.

Take a few minutes and read through this: http://docs.python.org/2/tutorial/stdlib.html#internet-access
7  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 05, 2013, 03:35:02 pm
What about unix sockets programming? Will I be able to do something comparable to what I am doing on arduino? I use server.available to detect incoming connections and then try to serve them. The TCP stream can be read with client.read().

You'll probably be working at a higher level. I recommend you work through some of the examples that I linked to to get a better idea of how it's done from a high level language. The short answer is yes, anything you can do you can do more easily with a real computer.
8  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 05, 2013, 12:05:19 am

BTW, have you tested directly connecting I2C and SPI devices other than arduino to pi? Those calls should block all interrupts when they transfer data, right?

Yes, I have used several I2C and SPI chips directly with the Pi. The I2C and SPI subsystems are intelligent enough to operate independently of the operating system so you don't have to worry about that.

Have you experimented updating sensor readings with your PI server? Once I am in Linux I am totally lost. I don't know how to receive HTTP requests, let alone responding to them. There must be tons of libraries to include, which in arduino you just get the bare TCP stream and do it the hard way, which I find easy (easy as knowing exactly where to get stuff and where to send stuff back).

Check here: http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/ch4.html to see a way to use Python and CGI to do what you are talking about. I'm using straight Apache instead of the server used in the examples but if you read through that tutorial, you'll get the idea.
9  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 04, 2013, 10:45:02 pm

As far as I know the arduino ethernet shield seems pretty stable. I have no experience with it so I hope it will be able to stay on for weeks or months at a time and accept connections from various places.

So if you use arduino + pi combo, then do you have to rewrite arduino library or create your own protocol to tell arduino what to do?

I haven't left an Ethernet Arduino on for months at a time so I can't comment. I have a Pi server that has run continuously since December so I'm happy with that. I may one day upgrade it to the latest os distribution.

I mostly use a simple serial protocol to communicate between the Arduino and the Pi. I have run the Arduino as an i2c slave. I've experimented enough with SPI to see that it works as an interface but I'm not using it for anything yet. There is the  WiringPi library for the Pi which duplicates the syntax for what you can do to pins on the Arduino, remembering that the os will interrupt periodically for a short time so you can't rely on servicing a pin or a peripheral at an exact rate. However, that's why you have the Arduino as the real time peripheral.

10  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 04, 2013, 02:35:29 pm
Ethernet promises longer distance calls so you can easily expand to a real distributed system smiley

So if I understand what you are suggesting, you want to be able to call remote Arduino procedures from a pc/RPi using some sort of routable protocol and using a syntax that is essentially the same as if you had called it from the Arduino itself. For example, in your pc/RPi program you would declare the Arduino procedures as external and it would just work. That sounds like a pretty ambitious project but as someone mentioned, the protocol may already exist.

If I were doing it, I would still tightly couple an RPi to an Atmega at each remote location and use the Pi for the Ethernet interface. I have permanently given up on Arduino with respect to Ethernet/wifi.

11  Using Arduino / General Electronics / Re: why do I need a pull down resistor when using an LDR? on: June 04, 2013, 10:46:22 am
I see, but the analog in pin (with analogRead) should be able to read values between 0 and 5 volts as far as I know, so why would I need to reduce this voltage ?

I tried doing this without the extra resistor, but then my readings were just 0 all the time.

At first I thought that I was making a short circuit, but I don't see how I can make a short circuit when there's already a resistor (the LDR) between ground and 5v.


The Light Dependent Resistor only has two leads. Which lead did you expect to change, the one attached to +5V or the one attached to ground?
12  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 04, 2013, 09:34:02 am
You have uart, i2c, and spi to exhaust before you you will need to try ethernet. That should keep you busy for a while. smiley
13  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 03, 2013, 01:02:05 pm
  If your program is time critical, you should be writing in a compiled lanugages and not an interpreted language anyway.  Any book on Linux should have the details if needed, it doesn't have to be R-pi only.

As always, time critical is relative. Interpreted Python can run faster on an RPi than compiled on an Arduino. For example, the Rpi has floating point hardware and uses it.

I think the biggest advantage of the RPi over Arduino is any application that uses a network or the Internet. I am a huge fan of both platforms when they are used together to exploit their strengths.
14  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 03, 2013, 12:52:16 pm
Thanks Papa G. I couldn't find if there is C programming and how to set up make file etc. on that book.

Maybe the co-author can comment on that. I haven't bought it because I'm past its intended audience. May pick it up just to support Grumpy_Mike though.

You're better off with a text covering gcc C/C++ for that though, in my opinion. If you have done any Atmel programming from the command line, you already know a lot of what you need.
15  Community / Bar Sport / Re: Is now the right time for a raspberry pi model B? on: June 03, 2013, 08:55:31 am
There's an interesting article about using ATTiny 44/84 with the Raspberry Pi in this month's MagPi, http://www.themagpi.com/en/issue/13 as well as a review of "Raspberry Pi for Dummies"(Grumpy_Mike collaboration).
Pages: [1] 2 3 ... 27