News for hackers. Stuff that matters.
Re:Introducing Raspberry Pi B+ by copperx on Monday July 14, 2014 @03:21AM (#8029849)
I still can't see why would anyone buy one except as one of those toys that you buy and then gets tossed in the closet. 10 years ago I could see the appeal, but now? The robotics, home automation, and weekend project use cases seem like would be better served by a $5 microcontroller.

Some projects, such as the weather station, justify the use of a full-fledged OS, but with the cost of buying an existing, proven, weather station being so low ... why bother?

And for a cheap webserver? A $1/month VPS is more powerful than this thing.

Can anyone tell me what is the use case of this?

Re:Introducing Raspberry Pi B+ by weland on Monday July 14, 2014 @04:12AM (#8029987)
I don't have the Raspberry Pi, mainly because, since I develop embedded software for a living, I have an endless supply of development boards I can hack on at work and am free to take home (during those evenings when I am not so fucking tired of flipping bits that I don't even want to SEE C code!), but:

* A platform with less legacy crap than x86 is wonderful for learning about OS development. I don't know how the Pi fares for this, with Broadcom's chip and all, but if I had the free time to hack an OS in my spare time, not dealing with all the thirty year-old cruft nor shedding a gazillion EUR on a PowerPC system would be ideal.

* There's a legitimate audience of visual artists, musicians or just tinkerers who, as outrageous as might sound to us, long-bearded bit twiddlers, find learning anything other than Python either hopelessly complicated or just not refreshing enough. Aye, their needs would be better served by a 5-dollar MCU, but when an extra twenty dollars buying you the ability to write the code on the same computer that runs it, it's hard to resist. I find myself breaking the sacred oath of not using even one bit more than I need, too, because it's Saturday and my cat wants some attention too and I derive far more pleasure from seeing the jukebox playing music than from knowing the half-done file loader module that will eventually be part of a jukebox eighteen Saturdays from now on is so optimized that even an optimizing compiler would slash its veins in envy.

* The "cheap webserver" part is generally useful when you actually want one to interface something with the outside world over the Interwebs. I find the idea of using HTTP for much of this rather... repugnant, but there are people to whom it isn't, and a VPS isn't of much use if the requirement is to toggle this relay in response to that HTTP request.

Re:Introducing Raspberry Pi B+ by userbinator on Monday July 14, 2014 @04:55AM (#8030096)
> A platform with less legacy crap than x86 is wonderful for learning about OS development. I don't know how the Pi fares for this, with Broadcom's chip and all, but if I had the free time to hack an OS in my spare time, not dealing with all the thirty year-old cruft nor shedding a gazillion EUR on a PowerPC system would be ideal.

Actually I'd say the x86/PC is probably one of the best-documented and most stable platforms out there to learn on at the moment, precisely because it has been around for so long. Largely due to Broadcom policy the Pi is notoriously closed and proprietary at the hardware level, and unless there is somehow a massive amount of reverse-engineering like what happened with early home computers (which were better documented so the process started more easily), or a datasheet leak, the situation is unlikely to change. Any of the other open ARM devboards in the same price range would also be good candidates for OS development, but not the Pi.

Re:Introducing Raspberry Pi B+ by weland on Monday July 14, 2014 @05:36AM (#8030193)
> Actually I'd say the x86/PC is probably one of the best-documented and most stable platforms out there to learn on at the moment, precisely because it has been around for so long.

Unfortunately, that also means there's a lot of inconsistency, conflicting advice and outdated code that beginners take for granted. It's quite annoying.

Re:Introducing Raspberry Pi B+ by girvo on Monday July 14, 2014 @06:55AM (#8030335)
This is something I'm very interested in, and nearly bought a Pi today; I want a board that I can learn ARM assembly and C on to build a toy OS. I built half of a tiny kernel on X86 (woo real-mode!) nearly a decade ago, so I know a tiny bit about it all, but I'd assumed the Pi was a great target: well priced, tonnes of them out there so hopefully well documented, etc.

What would you suggest instead? I'm considering just firing up QEMU and it's ARM baseboard target then dealing with porting to real hardware later, but there's something exciting about seeing a real circuit firing up your kernel that makes me smile.

Re:Introducing Raspberry Pi B+ by weland on Monday July 14, 2014 @09:52AM (#8030881)
Basically what userbinator said.

I had to deal with them before, so if you can, stay away from cheap Chinese boards or hackable routers. When you're just learning, it's not worth it, the dollars you save will be more than made up in working around subtle bugs and trying to figure out what the poorly-worded, incomplete documentation is trying to convey.

I also warmly suggest not to bother with anything that says Atheros or Broadcom on the case. Their documentation is hopelessly tucked away behind a gazillion NDAs you have to sign, and working based on leaked material isn't fun. As for their SDKs, if you could get me started (but you can't because I signed that gazillion bazillion NDAs and I don't wanna go to jail), I could talk for days.

Sadly, I haven't worked with it either, but the Beaglebone Black looks like a good option and there's an actual community around it.

Re:Introducing Raspberry Pi B+ by girvo on Monday July 14, 2014 @08:26PM (#8034032)
I'll definitely pick a up a Black then, as I do love TI chipsets and have had good experiences with their documentation. Such a shame they left the mobile market.

I'm setting up QEMU to have a crack at that while I wait for it to arrive. Thanks for the advice! I wish I could get you started, damn NDAs, I reckon you'll have a few stories to tell

Re:Introducing Raspberry Pi B+ by xavierxf on Monday July 14, 2014 @09:11PM (#8034185)
Do you, by any chance, know of a resource that documents the process of actually getting your toy OS (which I assume was cross-compiled) to run on another board such as the BBB or the RPi?
Re:Introducing Raspberry Pi B+ by weland on Tuesday July 15, 2014 @04:02AM (#8035305)
Sorry for the late reply, I just saw your message. I don't have a toy OS (not enough spare time), but I did work on one as part of my job.

I don't know of any documents, but the way you'd generally want to do it is wrap hardware- and board-specific parts of your code in a hardware-agnostic interface which is what you use to write higher-level code in the system. That way, getting the OS to run on another CPU or board is all about writing the relevant callbacks. You can get the general idea from Linux's mach-* and plat-* files. This isn't really OS-specific; I'm pointing at Linux because it will probably be easiest to get documentation about it, though my personal preference is elsewhere.

Re:Introducing Raspberry Pi B+ by userbinator on Monday July 14, 2014 @09:37AM (#8030813)
If you're looking for something in the Pi price range, a Beaglebone Black seems about right and the TI SoC it uses has tons of publicly available, detailed documentation. On the other hand, if you want more features/periperals/cores, and don't mind not-so-thorough documentation, one of the boards based on Chinese SoCs could be more fun...

Here's a huge list of others: http://socialcompare.com/en/comparison/low-cost-arm-boards

Re:Introducing Raspberry Pi B+ by voltagex_ on Monday July 14, 2014 @07:17AM (#8030387)
I think the current version of qemu can more closely emulate a Pi, rather than just a generic ARM processor.

There was also a small Pi emulator posted as part of the StarFox project on HN a while back.

Re:Introducing Raspberry Pi B+ by tdicola on Monday July 14, 2014 @03:52AM (#8029941)
Running Linux in embedded projects is still super useful. You can use pretty advanced software like speech recognition (PocketSphinx, etc.), image processing (OpenCV), and more to make cool stuff that would be miserable/nearly impossible to implement bare metal on a fast CPU. Even networking heavy or UI heavy projects would be much easier on a machine that runs a real operating system.
Re:Introducing Raspberry Pi B+ by pjc50 on Monday July 14, 2014 @06:24AM (#8030283)
The use case of the Pi is a computer that can be given to small children to be theirs, to be a counterpart to the BBC Micro of thirty years ago.

It's also an attempt to get right what the OLPC people got wrong (too expensive, too different from all other systems).

It has to have a decent display, which really rules out microcontrollers (an early prototype was indeed an AVR that ran Lua and output composite video). It has to be cheap, and indeed it is cheaper than all the other full-fledged Linux boards with larger processors and more RAM.

Re:Introducing Raspberry Pi B+ by koralatov on Monday July 14, 2014 @06:54AM (#8030333)

   > The use case of the Pi is a computer that can be given to small
   > children to be theirs,
I completely agree with this part...

    > to be a counterpart to the BBC Micro of thirty years ago.
But I don't really agree with this part. The BBC Micro was much more expensive in real terms when it launched, and never got down to an equivalent price during its lifespan. Only when it became a hand-me-down, replaced by something more powerful, did it have become the property of a kid. (I saw this happen with several friends.)

The Pi is something new --- its the first computer truly designed to be owned by almost all kids, from new. It's so cheap, and uses equipment most people have already (especially the TV), that only the very poorest can't afford one, and it's cheap enough that destroying one whilst tinkering isn't a disaster.

Re:Introducing Raspberry Pi B+ by VLM on Monday July 14, 2014 @09:07AM (#8030689)
"became a hand-me-down"

Speaking of "hand-me-down", the pi kind of kills the used/junker PC marketplace for little experimental projects, when you can work on your project instead of debugging old/worn out hardware for only $40 or so. Also it uses about 1/10th the power of a repurposed desktop, so why not.

For an experiment, I could pick up a free, dusty, worn out desktop that draws 100 watts and stick a new small/tiny hard drive in it for about $50 and have a giant paperweight that needs hardware troubleshooting, or spend the same cash on something tiny that draws about as much power as a clock radio and is new so presumably more reliable.

Its hard to justify picking up junker "free" PCs in the era of the pi.

Re:Introducing Raspberry Pi B+ by pjc50 on Monday July 14, 2014 @07:10AM (#8030365)
Well yes, we've had 30 years of cost reduction, but "play the same social role as the BBC Micro in computer education in the UK" was the goal of the Foundation.
Re:Introducing Raspberry Pi B+ by lovelearning on Monday July 14, 2014 @04:05AM (#8029969)
I built my own home security system with a Pi as the brains to control camera streaming and do face recognition using OpenCV. Is there a $5 microcontroller that can do all that? Admittedly, it's a big load on the Pi and I'm looking for more powerful single board computers, but that again eliminates $5 MCUs.

I have another Pi working as a drop-in replacement wifi router that routes data via a USB data dongle in case my main internet connection fails. This too may be too much to ask from a $5 MCU.

Re:Introducing Raspberry Pi B+ by Khaine on Monday July 14, 2014 @05:33AM (#8030190)
That sounds awesome! Would you mind sharing your project?
Re:Introducing Raspberry Pi B+ by lovelearning on Monday July 14, 2014 @05:38AM (#8030198)
I've been planning to write about them on a blog, but haven't started yet. Hopefully sometime soon.
Re:Introducing Raspberry Pi B+ by vlad003 on Monday July 14, 2014 @03:42AM (#8029920)
My understanding is that the Raspberry Pis are intended to be used in education. The front page says: "We want to see it being used by kids all over the world to learn how computers work, how to manipulate the electronic world around them, and how to program."

That said, I use mine as a simple NAS for backups.

Re:Introducing Raspberry Pi B+ by jiggy2011 on Monday July 14, 2014 @03:51AM (#8029940)
The problem is that it's too slow to be used as an actual development computer, so you have to write your code on another computer and then copy it over to the pi.
Re:Introducing Raspberry Pi B+ by ibisum on Monday July 14, 2014 @04:14AM (#8029991)
"Too slow"? Thats a very consumer-centric point of view. Compiling onboard is quite sufficient for most small projects, and really .. its a matter of patience, but for sure its quite usable. For those more used to the fat-IDE approach, where everything is done for you at a few clicks, its certainly not interesting .. but if you want to get really familiar with software development, doing things onboard the rPi can be a very effective way to develop. The so-called limitations of the device can also work in your favour: write smaller, tighter, leaner modules, and you don't have to wait so long in between compiles.

Not to mention that there are plenty of ways to use the rPi that don't require compiling. I myself use an onboard Lua environment, which just plain rocks .. ssh in, open up vim, edit Lua .. run in another terminal. Quite a comfortable environment, and I hardly even care that its on a 'small/slow CPU' (after all, I lost interest in the speed race decades ago. Those of us who grew up building the Linux kernel on MHz-class machines don't feel your pain.)

Re:Introducing Raspberry Pi B+ by jiggy2011 on Monday July 14, 2014 @04:21AM (#8030006)
Hooking the Pi up to a monitor and using it to actually edit on is extremely slow, once you've loaded an editor a browser a couple of terminals and maybe an MP3 player it's a crawl compared to devices anyone is used to in 2014.
Re:Introducing Raspberry Pi B+ by ibisum on Thursday July 17, 2014 @02:41PM (#8049342)
I don't, ever, even think about lag in between :w and :ma .. these things just plain work. For everything else, there's 'cscope -R -s /usr/include #&etc'.

For pure C/C++ projects, I use cscope+vim+make on the rPi. For Lua projects, just vim .. and a few judicious 'watch ./ make' style sub-cmds in another shell.

GUI editors are not your friend, I accept that. But there is more beneath the hood than such a dilemna as not enough RAM to load bitmaps ..

Re:Introducing Raspberry Pi B+ by tdicola on Monday July 14, 2014 @03:55AM (#8029952)
Check out sshfs or similar user-mode filesystems to make the Pi look like a drive. Cyberduck is another tool that has a decent file explorer UI around SSH/SFTP and is cross platform.

If you're writing C/C++ you can set up a cross compilation tool chain to write and compile code on any Linux machine. It's a pain but there are lots of blogs posts and guides on it.

Re:Introducing Raspberry Pi B+ by jiggy2011 on Monday July 14, 2014 @04:12AM (#8029986)
Sure, but I mean you already need another computer in order to program the pi at which point you already have a computer that can run programs without the pi.
Re:Introducing Raspberry Pi B+ by gnaffle on Monday July 14, 2014 @07:24AM (#8030401)
Here are a couple of use cases:

- Stick it on the back of your 3D printer and run OctoPrint on it to give a nice web interface for your 3D printer (and a web cam for time lapse capture).

- Connect it to my digital piano to record playing sessions and upload the MIDI files automatically to dropbox without me having to push any buttons except the "on" button on the piano.

There are a thousand other use cases where you want something more than a microcontroller, you just have to use your imagination!

Re:Introducing Raspberry Pi B+ by TheOtherHobbes on Monday July 14, 2014 @06:59AM (#8030343)
I made a home heating controller with temp plotting and frost alarm out of a couple of Pis.

I don't think a $5 microcontroller would have run a tiny web server, tiny email server, or the plotter code that forms the core of the project.

The Pi is a fine budget Linux computer. It's not fast, it's not powerful, it's not expensive.

But it's fast enough and powerful enough for embedded applications you can put online without breaking a sweat.

Re:Introducing Raspberry Pi B+ by mnw21cam on Monday July 14, 2014 @12:19PM (#8031628)
That sounds cool. Do you have any more details of the home heating project? I'm considering doing something similar.
Re:Introducing Raspberry Pi B+ by TheOtherHobbes on Monday July 14, 2014 @01:17PM (#8031986)
I bolted some 10A 5V relays onto the GPIO pins via a 3V3-5V converter board to switch the heating circuits on and off.

There are some standard 1-wire temp sensors - docs are easy to find online. The 1-wire protocol allows for really long cabling and doesn't need external power, so it's ideal for this kind of project

There's some incredibly simple Python code controlling the relays and reading the sensors, and GNUPLOT runs off a cron job to plot the temperatures to image files that get served in a web page via lighttpd.

Because I don't have a static IP at home the Pi pings my Linode server with its IP address every minute, and the Pi server web pages are wrapped in an iframe that pulls them off the current home IP.

The whole thing is a total hack, but it works well enough. Bottom line is I can see the indoor/pipe/tank/outdoor temps from anywhere, and the heating turns on if it thinks the pipes are going to freeze, and turns off if the water in the tank and/or room temps are warm enough. I can also turn the heating on and off remotely.

It wasn't quite trivial to do, but it wasn't a hair-tearing challenge either. So far as I can tell, it was easier than it would have been with alternative boards.

Basically anyone who knows beginner-level Linux server set-up and some very basic electronics should be able to build something like this around the Pi. It's perfect for this kind of embedded micro-server/controller project.

Re:Introducing Raspberry Pi B+ by mnw21cam on Wednesday July 16, 2014 @12:27PM (#8042887)
Are you controlling the heating in each room separately?

From your description saying "relay", I'm presuming this is electric heating?

Do you find that this keeps all the rooms around the right temperature? The usual problem with a normal heating system is that you have parts of the house that regularly are hotter or colder than the rest, so I was wondering if you had managed to solve this.

I'm looking to control radiator valves electronically, which of course relies on someone actually making electronically controlled radiator valves that don't cost a stupid amount of money.

Re:Introducing Raspberry Pi B+ by stadeschuldt on Monday July 14, 2014 @02:34PM (#8032430)
Not a heating project but maybe this will inspire you. My RPi monitors of temperature and humidity in- and outdoor of my apartment: http://pi.tafkas.net/temperature

Documentation: http://blog.tafkas.net/2012/10/03/gathering-and-charting-tem...

Re:Introducing Raspberry Pi B+ by fnordfnordfnord on Monday July 14, 2014 @11:59AM (#8031506)
I'm currently putting together a data recorder for an academic experiment. It requires: GPS, Camera, Environmental data, inclinometer, and a few other odd bits. I could build up a custom system, but that is a big NRE expense for something that less than ten of will probably ever be produced. I could also use a "better" but less common developer board, but that path has its own problems. The experimenter could have stuck with a COTS solution, but the reason that I'm working on it now is the inconvenience and poor quality of the current implementation (lots of COTS stuff bodged together). Currently, they are using a lot of COTS stuff, and then putting the data together in batches. Even though it is a somewhat automated process, it remains slow, labor-intensive, tedious, fragile, etc. When I am done, I get to hand off an integrated, fully automated system that is flexible, built with easily replaceable parts, and best of all; due to the abundance of freely shared examples and documents, a grad student, or even an ambitious undergrad can take over and manage or even customize the system. Also, the rPi based system is much cheaper than the current system.

So, there is one pretty good use for an rPi.

Re:Introducing Raspberry Pi B+ by malaporte on Monday July 14, 2014 @04:50AM (#8030080)
I've been using a Pi running XBMC for about a year. It's connected to a big hard drive. I can copy stuff there from my laptop (movies, music, etc.) It works pretty well; I don't remember having to "service" it in any way since I plugged it in.

It works fine to stream stuff from YouTube, too. Shows for kids, etc. The XBMC remote on my phone is pretty handy too.

Overall, I'm pretty happy with it.

Re:Introducing Raspberry Pi B+ by mhurron on Monday July 14, 2014 @06:57AM (#8030340)
Does it handle HD content?
Re:Introducing Raspberry Pi B+ by antocv on Monday July 14, 2014 @07:42AM (#8030434)
Yes, yes it does play HD movies well. Even streaming them.
Re:Introducing Raspberry Pi B+ by lmedinas on Monday July 14, 2014 @07:12AM (#8030376)
Yes, using omxplayer and XBMC.
Re:Introducing Raspberry Pi B+ by seanp2k2 on Monday July 14, 2014 @03:42AM (#8029918)
I can run python on it. Yes, I'm aware of http://www.pymcu.com/index.html , but they're cheap enough for projects and familiar enough for people vaguely familiar with Linux that it ends up being a good combination for lots of fun projects. It's probably overkill for >90% of things people use it for, but usability is the big advantage.
Re:Introducing Raspberry Pi B+ by throwketchup on Monday July 14, 2014 @10:27PM (#8034405)
It's a valid question, not sure why you're being down voted. It nicely fills the use case of "I could totally run this project from an 80 cent microcontroller, except that it needs network connectivity, and the only practical way to do that in my environment is with 802.11 or 802.3."

The Raspberry Pi designers made a bunch of, IMHO, totally bone-headed design decisions early on (e.g., RTC "costs too much", but let's throw on a bunch of expensive ZIF connectors for overpriced peripherals that nobody will use) and the B+ is a move in the right direction to fix that.

My use case is "wifi terminal server." Which is to say that I built a battery-powered RPi system to connect Sky Safari on my iPad to a go-to telescope. The official Sky Safari wifi peripheral is $180 and can't even act as an access point! With the RPi, I have a better uart bridge (in that it runs hostapd) for one third the cost of the official solution. Plus, there is the possibility of adding auto-guiding using the gpio pins and some hacking.

Re:Introducing Raspberry Pi B+ by greyman on Monday July 14, 2014 @04:30AM (#8030022)
My colleague uses it to run a python script to periodically download and store virtual currency prices. As I understand it, it is useful if you want to download stuff from the internet in certain time intervals.
Re:Introducing Raspberry Pi B+ by tlrobinson on Monday July 14, 2014 @05:25AM (#8030177)
There are roughly a billion ways to "download stuff from the internet in certain time intervals", but if for some reason the machine needs to be physically present, and dedicated to that task, then a Raspberry Pi is probably the cheapest way to do it.
Re:Introducing Raspberry Pi B+ by mikehall314 on Monday July 14, 2014 @05:07AM (#8030122)
I have one which I use as a VPN terminator for the office.