Topic: ESP32CAM with Mega
Hi
My problem is : no wifi connection
Question : how to support ESP32CAM ? or "how to debug to see the mistake"
Board : A photo resistor is connect to arduino and a ESP32CAM for wifi. (IOT with cloud)
Smartphone skin : switch for BUILTIN_LED, jauge and text for display luminosity
I
- followed tutorial for setting software serial at 19200 on pins 10 & 11 (respectly connected to Tx and Rx of ESP32CAM)
- added debug information via (hard)Serial to see luminosity value : my Mega working !!
- looked on my dedicated AP Wifi : no client (working with smartphone)
- used ESP32CAM without Remote and that work (with an other sketch of course)
- finally tried to used a strap between Gpio0 and GND during upload sketch via Arduino IDE, and one minute after remove it, and reboot (unplug and replug the 3,3v on ESP)
I precise i'm technology teacher but newbie with remoteXY (why this name?)
thanks for help
regards
Antoine
/*
-- New project --
This source code of graphical user interface
has been generated automatically by RemoteXY editor.
To compile this code using RemoteXY library 2.4.3 or later version
download by link http://remotexy.com/en/library/
To connect using RemoteXY mobile app by link http://remotexy.com/en/download/
- for ANDROID 4.5.1 or later version;
- for iOS 1.4.1 or later version;
This source code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266_SOFTSERIAL_CLOUD
#include <SoftwareSerial.h> // Inclue depuis Arduino IDE 1.0 - Permet la communication Serie sur les Pins de l'Arduino https://www.arduino.cc/en/Reference.SoftwareSerial
#include <RemoteXY.h> // Inclure das sketch/library le fichier remotexy.h
// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 10
#define REMOTEXY_SERIAL_TX 11
#define REMOTEXY_SERIAL_SPEED 19200 // Limit to 19200 voir https://remotexy.com/en/help/esp8266/ Send AT+UART_DEF=19200,8,1,0,0 with Basics/BareMinimum before !!!
#define REMOTEXY_WIFI_SSID "wifi-BYOD"
#define REMOTEXY_WIFI_PASSWORD "MotDePasseWiFi"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "778eeefea6b48bbb2c3faa2c0d82f130" //token for LSC account
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,1,0,12,0,49,0,10,13,2,
2,1,8,14,22,11,4,8,22,11,
2,26,31,31,79,78,0,79,70,70,
0,66,1,39,12,16,29,24,34,7,
16,2,26,67,4,59,25,20,5,33,
38,20,5,2,26,11 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t switch_1; // =1 if switch ON and =0 if OFF
// output variables
int8_t level_1; // =0..100 level position
char lum[11]; // string UTF8 end zero
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_1 LED_BUILTIN //13
void setup()
{
RemoteXY_Init ();
pinMode (PIN_SWITCH_1, OUTPUT);
// TODO you setup code
Serial.begin(9600);
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
int lum = analogRead(0) / 10.23;
RemoteXY.level_1 = lum;
dtostrf(lum, 4, 0, RemoteXY.lum);
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay()
Serial.println(lum);
}