Smart Home Automation Forum
[Arduino demo source code for KC868-A4]-11 how to create wifi connection - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A4 (https://www.kincony.com/forum/forumdisplay.php?fid=21)
+--- Thread: [Arduino demo source code for KC868-A4]-11 how to create wifi connection (/showthread.php?tid=1783)



[Arduino demo source code for KC868-A4]-11 how to create wifi connection - KinCony Support - 03-28-2022

Code:
#include <WiFi.h>
void setup(){
  WiFi.begin("SSID", "PASSWORD");
  // SSID and password is the router you want to connect
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.begin(9600);
}

void loop(){
  Serial.println("Local IP:");
  Serial.println(WiFi.localIP());
  delay(1000);
}
       


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - masoos - 07-05-2022

Hello,I have a problem.....wrecked my A4 board with this code.....

I uploaded this code (while I forgot to change the SSID / Password) and the code was uploaded fine by COM10.Then suddenly COM10 disconnected.

Its stays disconnected. Windows does not show COM10 anymore.
I press Reset...voila...com10 connects...
BUT if I release the Reset button, COM disconnects.

I rebooted windows...no difference :-) 
IDE only detects board, while I press reset button (but during this I cannot reflash code)
If I release reset...board is gone

Huh Huh Huh

(07-05-2022, 09:05 PM)masoos Wrote: Hello,I have a problem.....wrecked my A4 board with this code.....

I uploaded this code (while I forgot to change the SSID / Password) and the code was uploaded fine by COM10.Then suddenly COM10 disconnected.

Its stays disconnected. Windows does not show COM10 anymore.
I press Reset...voila...com10 connects...
BUT if I release the Reset button, COM disconnects.

I rebooted windows...no difference :-) 
IDE only detects board, while I press reset button (but during this I cannot reflash code)
If I release reset...board is gone

Huh Huh Huh

I found solution.

open other code and flash again....in the "connecting ........." info wait till 80% progress is made and then release reset button. If you are happy with the timing, the new code starts flashing before windows is closing COM Port


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - admin - 07-05-2022

if you are using KC868-A4 , actually you not need to use "download" button, it can auto download. just make sure your have stable dc12v for the board.


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - masoos - 08-14-2022

(07-05-2022, 10:32 PM)admin Wrote: if you are using KC868-A4 , actually you not need to use "download" button, it can auto download. just make sure your have stable dc12v for the board.

Hello,

I still encounter the problem, that the board is only recognozed by my USB when I hold the reset button. when I release reset, I hear windows sound and the USB disconnects. I searched for this problem and I found that other encountered similar problems with other boards. https://forum.arduino.cc/t/arduinos-only-on-when-reset-button-is-pressed/305602....

I think this has something to do with the RTS signal. There I see a difference with or without reset

Any idea how I can fix this?

I have latest USB drivers
The board shows a stable 5V and 3,3V signal on the oscilloscope.

Thanks, 
M


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - admin - 08-15-2022

can you change a USB cable for a test.


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - masoos - 08-15-2022

(08-15-2022, 03:24 AM)admin Wrote: can you change a USB cable for a test.
did, no effect

(08-15-2022, 10:25 AM)masoos Wrote:
(08-15-2022, 03:24 AM)admin Wrote: can you change a USB cable for a test.
did, no effect

It only works, if I connect Pin 14 on the CH340 (RTS) to GND....the USB is connected. 
What is nomal level on RTS without Reset? Is it Low or high?. I have a high (3,16V) 

Thanks


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - admin - 08-15-2022

tomorrow we check.


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - masoos - 08-15-2022

(08-15-2022, 11:15 AM)admin Wrote: tomorrow we check.

I'm sorry, Problem was fault power supply. now with more stable source it works! Thanks


RE: [Arduino IDE demo source code for KC868-A4]--#11-WIFI connect - admin - 08-15-2022

ok, i have told you , use a stable DC12v power supply.