Keyestudio smart farm & house


Hi, trying to set up the smart house and farm for my kids, but I can't make it works since the very first step (testing the led). As I'm totally inexperienced in Arduino and codage I can't explain and understand why following exactly the guide this doesn't work. Do anyone can help and give me advices? I'm connected with my Mac and impossible to get the code uploading of the smart house esp32+ and make the led works and the same with a different bug. thanks in advance for this probably very simple understanding.

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

2 Likes

Where exactly did you get/copy the code from ?

The pinMode() statement should be in a function named setup(). Did you miss some of the code when you copied it into the IDE ?

The sketch appears to be the Blink example from the IDE. Try uploading that to the Arduino

1 Like

I am sorry to say I feel you are not quite ready to start the project at this point. We have no idea of your skill set or what resources you have available to you. I would suggest you start with some of the tutorials that are on line, sorry to say some are not so good but many are very good. Start by learning the basics, you will need to control outputs as well as interpret inputs such as reading a switch, receiving a message etc. Start with the LED, they are not expensive and there is even one on most of the Arduinos. At this point you should have also found several tutorials on basic electronics that you have gone through. You should acquire a copy of the Arduino Cookbook and go through that. I have no clue as to how fast you will learn this but it will probably take a few months.

During this process you will learn what an IDE is and how to use it to generate and upload your code to the Arduino. Let us know how you progress. For more help check this link: https://docs.arduino.cc/learn/starting-guide/getting-started-arduino/

The project you are trying is not simple from what I can see. The best thing for you to do is to do some tutorials. go through the cookbook first.

Thanks for the advice, I have watched and read before but a as simple as that process do not need to be an expert, but it doesn't work so I was asking for a kind help if ever other people have faced that before. I'll deep dive the subject

Hi, thanks for your feed back. I 've renews the full process following instructions and I get a new error ((as I'm a creative not a tech I'm a little bit lost). The is a cc from the tutorial here: Arduino Tutorials — keyestudio WiKi documentation and quite clear. the code : #define LED_BUILTIN 27 //LED pins

void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

The output is:
Sketch uses 267957 bytes (20%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20184 bytes (6%) of dynamic memory, leaving 307496 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port /dev/cu.Bluetooth-Incoming-Port
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2
But I dont' understand what's going wrong. I've been on the mentioned but don't find the answer : Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2

Sorry for asking probably simple question and in advance of any help.

Did you miss the request to post code in code tags ?

1 Like