Photon and Raspberry Pi

Friends,

I have recently discovered that the photon doesn’t have enough digital pins to support my current project. So I went looking for a solution and discovered the new integration of Raspberry Pi on the Particle Cloud. I wasn’t able to find much documentation on how to do it, it seems its still a new thing. Both the Arduino and Raspberry Pi have enough pins to support my project, but my only microcontroller experience is with the Photon.

So I come to you with a question. Is it worth it to get a Pi and try and learn it and how it interfaces with the particle cloud, or do I just get an Arduino and solely use it with a wifi chip?

How is steep is the learning curve on the Pi for someone who is relatively comfortable with the Photon, and i guess in turn the Arduino.

Doesn’t answer the question, but have you considered a GPIO expander? That should give you the pins you need.

1 Like

I had no idea those existed, ill will check those out and report back. At first search it looks like thats what i’m going to need. Any suggestions for expanders that work well with the particle platform?

Thank you!

I had a similar need. Check out my thread for more detail. @rickkas7 made some great libraries for the MCP23008 and MCP23017. You can also use the PCA9685 if you need PWM output. Both are I2c so two pins opens up nearly unlimited expansion potential.

PCF8574 IO Expander Board - Tutorial/example requested

I love Raspberry Pi, but I think it’s overkill for your need.

Edit: I made a breakout PCB for the MCP23008 and am working on one for the MCP23017. Let me know if you are interested and I’ll get my stuff uploaded to GitHub.

Thanks for the reply, Ill check those out. What would one use a Raspberry Pi for? It seems that they’re more of a small computer than a microcontroller. Would a Pi be more suited for production grade systems? I guess I’m missing the appeal of the Pi versus a Photon.

Thanks for the insight!

The Photon and Pi differ in a number of ways:

  • The Photon is an embedded microcontroller. It runs your application and that’s it. This simplicity means there are fewer things that can go wrong.
  • The Pi is a tiny Linux-based computer. That means it can perform many more things than the Photon can, but at the expensive of complexity and potential security issues.
  • The Photon by default does not have any exposure to the local network. This makes required security updates very rare.
  • The Photon runs a real-time operating system (RTOS). This makes it suitable for timing-dependent tasks that are not possible under Linux.
  • The Pi has a much faster processor, much more RAM, and by default includes an SD card which makes it more suitable for things like images and video.
  • Fleets of Photons can be managed entirely from the Particle console. You can do software and system firmware updates for any number of devices with a single click.
2 Likes

Just so you know there are a but load of them out there.
I have used this one on many products and just love it. Sparkfun makes a breakout board for it.

There are so many wonderful features about this part.
Connect up a matrix keypad, PWM, fade in out LEDS, blink leds, and what I really like is that it has 2 VCC pins, so if you have things that need 3.3v you can have 8 GPIO 3.3v and connect the other VCC pin to 5v, and the other 8 GPIO pins be 5v.

2 Likes

That’s exactly the difference. Micro controllers like Particle and Arduino are great at simpler or dedicated applications. They run their setup code, then run the loop function over and over. Pis and similar single board computers can run a full OS, usually Linux. They can be set up with a keyboard, mouse, and monitor, or they can run headless as a server without locally connected devices.

Currently in my house I have Pis serving:

  • one RPi3 running openHAB home automation server
  • one RPi3 running several services including an MQTT server, Logitech Media Server, and a file server
  • one RPi2 as a RetroPie classic gaming console
  • one RPi3 as a workshop computer, including the Particle integration

Other things you can do:

  • Kodi media server
  • Inexpensive security camera
  • lightweight desktop replacement
  • Weather station

This is far from a complete list. I use both Particle and Pi extensively, and each just has its strengths and weaknesses. You can even pick up a Raspberry Pi zero W for $10 (+ accessories).

1 Like

Apologies in advance for a noobish Q, but are there any hooks in Particle/Pi space for the Pi resident HDMI output?

1 Like