New to forum...need help with ino files

Home Assistant automation projects, questions, etc. go here.
Post Reply
cnselpaso
LED-Curious
LED-Curious
Reactions:
Posts: 10
Joined: Thu Jul 01, 2021 5:05 pm

Hi Everyone,
I just signed up but have been building this project for months. I have setup the automation like Ledgardener and am in the process of configuration. I do have background in IT in my previous job but programming is my weak spot. I currently have setup the Arduino Mega with the sketch from White Labs and the shield is commincating fine. However I am not sure what to do with the 2 ino files that were included in github download. They are the ctrl_box_esp32.ino and ctrl_box_mega.ino. Can someone point in the right direction? :roll:
Thanks for any assistance.
Shimbob
LED Wizard
LED Wizard
Reactions:
Posts: 642
Joined: Mon Nov 27, 2017 11:29 pm

Ino files in general are C/C++ source code files, in plain text format, that the Arduino SDK read/writes.

These must be compiled by the SDK into the actual software that you then upload to the esp8266/esp32/arduino/etc to run.
4way
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Wed Jul 07, 2021 4:37 pm

To expand on what Shimbob said: get the Arduino IDE https://www.arduino.cc/en/software (there's other ways including vscode) and you will be able to edit, compile and upload from one UI.
alp-farm
LED-Curious
LED-Curious
Reactions:
Posts: 1
Joined: Sat Jul 24, 2021 9:56 am

Hello, i have the same proble, we have uploaded the ino file to the adruino but how we do with the esp32?
We try to copy the code an insert it into Home Assistent ESP32 File but when we try to uplad it finds many errors in the code.
What are we doing wrong?
cnselpaso
LED-Curious
LED-Curious
Reactions:
Posts: 10
Joined: Thu Jul 01, 2021 5:05 pm

Sorry, I just now am able to get back to my post and see the responses.... thanks for the help!
I was able to see from your posts that the ino files were necessary and have been able to use the arduino program to upload to both chips fine.
That is where I have been working till now. I am not getting the esp32 to pull the data from the Arduino Mega and therefore not seeing the data flow that is suppose to happen between the 2 chips.
Here is a brief description of what I have done so far....
My esp32 is connecting to my Wifi and appears to be connecting to my MQTT broker even though I don't see the "connected" line in my serial monitor on esp32 sketch.the serial monitor stays at the line "connecting to mqtt_server."
But when I go into HA and view logs and see that it connected to my esp32 chip.
I did get the White labs EC and pH probes with the White Labs Shield. That part works because I first used the sketch from White Labs and was able to calibrate my probes and get readings. Afterward I used the "control_box_mega" ino file and was able to upload that to the mega. and the esp32 ino file and that uploaded successfully also.
That is where I have camped out for the last 2 weeks. Can't seem to get the readings from the probes to the esp32. If I go to Node Red and ask to see data from my topic feedback/atlas_ph I get "NAN" (not a number) for reply.
I did check and found that my 2 serial lines were not connected to the right channels so changed that the mega TX3 and RX3 were connected to RX2 and TX2 on the esp32 I changed that but still no communication.
Mean while I started my greenhouse and am doing manual dosing and reading from my bluelab pH and EC probes for temporary solution.

Any thoughts would be much appreciated...
Post Reply