Hacker News new | past | comments | ask | show | jobs | submit login

As someone who's been obsessing over SBCs recently, your comment really got me thinking. Many of the additions/changes I want to make to my Raspberry Pis is to make them more like a smartphone (microphone, camera, GPS, touchscreen, battery). And as an iOS user, I'm considering buying an Android phone just to play around with because it's so cheap and capable for odd projects.

That said, some easy things that come to mind regarding the usefulness of the Raspberry Pi and other SBCs:

1. GPIO pins for connecting external sensors/modules/peripherals

2. More "personal computer"-style ports than a phone (standard USB, ethernet, HDMI ports) which are good for things like small file servers, retro game consoles, or light desktop use (to name a few things)




Also wired Ethernet. Running a server over WiFi is flaky, especially on a phone optimized for low power usage. The Pi's wired networking is lackluster, but it's still more stable than WiFi.

And adding on to GPIO, the Pi has easy to use SPI and i2c busses. That opens up a huge range of sensors and other things like displays that work with easy to understand code. For a lot of use cases it's better to think of the RasPi as a very beefed up Arduino, not a barebones PC (or phone).


Hi, I'm looking to understand the sensors bit.

Beyond the fact that the most common sensors/peripherals are built in...I can find a lot of USB sensors that work with Android. In general you can also drop down to NDK (c code) on Android if you want.

So I'm still curious on which sensors would not work with a Android phone that people would want to.


Let's see... USB sensors add unneeded complexity AND power requirements.

How would you stick an Android phone plus a whole octopus of usb peripherals inside a nice neat box? It would be at least shoe box size.

If you need a board that will run 24/7 and control some process, remember Android goes into power management to save battery, and you need to fight it to operate continously. Might not even be possible any more with newer Androids that restrict wake locks.

RPi reliability isn't as good as it could be, at least not without cooling, but I would trust it for long time operation any time over a $30 phone that had to include a screen and a battery in that price and thus has made a lot more compromises.


Literally tens of thousands of them. Sensors are not interchangeable, if you have requirements on precision/accuracy for your project then it dictates what you have to use. And often enough the on board in a phone sensors aren't reliable (e.g. temperature sensor on a phone is useless for measuring ambient temperature) or not precise enough. Or other things like driving a stepper motor using an SPI-based driver, controlling a character display or interfacing with an external DAC/ADC.

It's important to note that I'm talking good old electronics projects, not things like single-use kiosk devices. Like I said earlier, the RasPi is similar to the Arduino in that it's suited to "edge" tasks - interfacing a computer / network with the physical world through sensors and actuators.

Some of this stuff is possible on an Android device, but more complex because they aren't designed for it. Meanwhile this is what the Raspberry Pi was always intended for and is much simpler. There are cases where an old phone might work better, but there are many where it won't work at all or would be a lot of extra work.


USB sensors are more expensive and need an USB hub (which raises the price, what's the point then?).

Not to mention most sensors (humidity or CO2 for example, or even just a simple potentiometer) are not USB (and for a good reason, I don't want/need USB chips and connectors in each one of my sensors).

Example applications I use Pi for: automated irrigation, custom digital musical instruments.


> Also wired Ethernet.

This got me curious: I tried to plug ethernet cable to a phone via USB adapter, and to my surprise, it worked!

Simply got a prompt to configure ethernet IP settings.

Disabled wifi and mobile data, web browsing via ethernet connection worked fine.


I'm aware, but it's not a very clean solution. Now you need a USB-OTG cable with charging and a USB ethernet adapter.

Also in my experience (which was admittedly limited since it didn't work well) it was very crashy, with the connection going down after a few hours. Probably a quirk of my specific tablet or ethernet adapter but still it's a potential problem.


How do you charge the phone and use ethernet at the same time?


You can get USB-OTG cables that split off so you can plug in a charger, but I think (not sure) that it's not universally supported to use USB-OTG and charge at the same time.


I made this comment in another reply.

>On gpio - curious. What applications would you use it for ? Generally they are useful for attaching peripherals like GPS modules, wifi,etc....And I grant there might be some modules that you might need. But isn't the phone solving the 99 percentile use case without need for gpio?

External ports like USB, HDMI,etc are easily done. In fact, there are zillions more accessories for the Android world than the RPI world. And cheaper too. https://youtu.be/n1BBX6hEo8E


> External ports like USB, HDMI,etc are easily done.

I agree that it's easily done, but can you do 2-4 USB ports and HDMI at the same time for a gaming console, or USB + ethernet for a file server? I genuinely don't know, but knowing what I know about iPhone accessories (admittedly also not a ton) I don't think you can. At the very least it adds to the cost and removes some convenience.

Some GPIO sensors I've played with are: IR receiver, RGB LED, waterproof temperature sensors, combination temperature/humidity sensors. You can connect many of these at once, and solder the connections for a more permanent tiny appliance. This link lists lots of interesting/useful sensors and components: https://tutorials-raspberrypi.com/raspberry-pi-sensors-overv...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: