I am very new to Particle. I have used Raspberry pi and Windows IOT somewhat so I have an medium understand of items… My current issue is i need to send and receive data to my Raspberry pi.
The raspberry pi C# needs to receive cell text message when the electron receives those messages
The raspberry pi C# needs to be able to send a text message via the electron.
I want to be able to control the Electron via SPI and i am a bit lost on where to start.
Is this possible?
Can someone help me get started or point me in a good direction?
Let me ping someone that might be able to help with this. @rickkas7 are you able to assist with this?
This project is feasible, but not exactly easy.
The Pi and the Photon could communicate by SPI, I2C or Serial, all of which have plusses and minuses.
As for the part on the Electron, note that the Particle SIM does not support SMS, so you’ll need to use a 3rd-party SIM card. This has been discussed on the community forums:
Unfortunately we can’t really provide that level of support in customer support. I’d recommend breaking down your project into the hardware connection, Pi-side communication, Electron-side communication, and the SMS code on the Electron. The community forums can help, but I’d approach it more from the lines of I’m trying to use the SPI calls in slave mode with this code and it’s doing this but I’m expecting it to do this. Questions like that get the best responses in the forums.
Good luck with your project,
This sounds like the kind of thing that would easier with a 3G USB dongle plugged into the Pi. They (and indeed cellular modules in general) are designed to take instructions to send and receive SMS messages. The electron has a whole bunch of other stuff bolted on to make it a fully independent controller. Plenty of projects and tools out there to handle that kind of thing. Also once you have a proper computer like the Pi you can also send and receive messages using an SMS gateway which for some use cases might be cheaper depending on the network, coverage etc.
I can use particles cloud to send and receive messages. I kind of like the idea of subscribe to a message type. That works perfect for what I am looking to do.
I also want to control a couple of sensors with this so I can off load a little bit from the pi
Anything can communicate on the i2c bus. I just can’t figure out how to get them to communicate.
I was thinking of also trying spi. But i2c would be better I believe it is a faster bus
From what I was reading i2c can have a speed up to around 3 megs
@ChrisCalzaretta, the Electron I2C only supports speeds up to 400KHz while SPI can reach 30MHz. For SMS and sensors, I2C should be just fine. With I2C you will need pull-up resistors and a common GND between the RPi and the Electron. I suggest making the Electron an I2C slave and you will find some example code in the Particle documentation and on this forum.