Author Topic: Cyclops WiFi project  (Read 3620 times)

0 Members and 1 Guest are viewing this topic.

Offline cyclops

  • Posts: 37
Cyclops WiFi project
« on: December 09, 2018, 10:49:48 PM »
Starting this thread as I have a cheap way of making the eparrot WiFi enabled for around £10. Small amount of code modification is needed and a bit of software installed.

I will put more details later when on the laptop

Offline ketel3

  • Admin
  • Posts: 1377
  • Eparrot.org
Re: Cyclops WiFi project
« Reply #1 on: December 09, 2018, 10:53:31 PM »
That will be great Cyclops.

Not sure how you tackeled  it at the latest way.


Better bad weather than no weather

Offline ShiFu

  • eParrot.org
  • Admin
  • Posts: 1984
Re: Cyclops WiFi project
« Reply #2 on: December 10, 2018, 11:02:21 AM »
I'm replying to this thread so the forum will notify me when new posts are made to your WiFi project.
I find this fascinating.
Stay calm and follow the screaming people.

Offline cyclops

  • Posts: 37
Re: Cyclops WiFi project
« Reply #3 on: December 10, 2018, 01:21:56 PM »
You will need a raspberry pi zero w for this project and an eparrot. Any eparrot will do as we can edit the code to connect them together.

Connect the power supply to the raspberry pi to a micro usb cable, I then connect the other usb port to the Arduino which then powers on the Arduino too. (I am looking at designing a case to fit the pi inside and connect with pins instead of a cable).

This gives a serial connection between the 2.

For the code you need to start a serial connection in setup() by adding the code:
Code: [Select]
Serial.begin(115200);
Now we need to send any information we want to the pi through serial. This will be done in the loop section.

Offline cyclops

  • Posts: 37
Re: Cyclops WiFi project
« Reply #4 on: December 10, 2018, 08:46:32 PM »
Now we add some string variables to the Arduino code, do this before anything is run so put at the top of the script after any \include parts

Code: [Select]
String bTempString;
String vTempString;
String bABVString;
String vABVString;
String pressureString;

So now we can send the information to the pi.

I use this in loop.

Code: [Select]
// Initialising the strings.
    bTempString=String((float)dallascorrect);
    vTempString=String((float)boilingcorrect);
    bABVString=String((float)ABV_Probe1_float*0.1);
    vABVString=String((float)ABVcorrect);
    pressureString=String((float)Pressure);

//Start serial send
    Serial.print("{");
    Serial.print("\"""BoilerTemp""\"");
    Serial.print(": ");
    Serial.print(bTempString);
    Serial.print(",");
    Serial.print("\"""VaporTemp""\"");
    Serial.print(": ");
    Serial.print(vTempString);
    Serial.print(",");
        Serial.print("\"""BoilerABV""\"");
    Serial.print(": ");
    Serial.print(bABVString);
    Serial.print(",");
        Serial.print("\"""VaporABV""\"");
    Serial.print(": ");
    Serial.print(vABVString);
    Serial.print(",");
        Serial.print("\"""Pressure""\"");
    Serial.print(": ");
    Serial.print(Pressure);
    Serial.print("}");

What I am doing is just passing the variables to the pi in JSON order so we can parse it easier in the pi program. I have made it so

The program we will be using on the pi is Node-Red. It can be found here https://nodered.org/

Install this to the pi through the terminal is easiest.

Offline ketel3

  • Admin
  • Posts: 1377
  • Eparrot.org
Re: Cyclops WiFi project
« Reply #5 on: December 10, 2018, 11:11:58 PM »
Well that is some nice info,some coding and basic know how needed.

But I know you did great projects in the past , so you have a good basic knowledge.
For me this sounds quit complicated,so have to do some more reading.
Node red Yep I have heard about it.
Better bad weather than no weather