I have DUE R3 and module ATWINC1500 FW 19.4 Connect them together, load with example code, I can log data to xampp server and work as SimpleWebServerWiFi(control via webpage).
I follow the link below to Log data and it work OK. Link:
Then I use MCU ATtiny3216SN 20 pin and connect ATtiny3216 with second module ATWINC1500 FW 19.4.
I install megaTinyCore for ArduinoIDE, setting board megaTinyCore use for ATtiny3226/3216/1626/1616/1606/826/816/806/426/416/406, choose chip is ATtiny3216, clock is 20MHz then I choose programmer is ATMELICE
with the code work with DUE, I change a little at pin for WiFi.setPins(0,1,2);
Then I "upload using programmer" to ATtiny3216SN by ATMELICE.
output command show warning:
/home/scxxxxxa/Arduino/libraries/WiFi101/src/common/include/nm_debug.h:73:6: warning: "CONF_WINC_DEBUG" is not defined, evaluates to 0 [-Wundef]
#if (CONF_WINC_DEBUG == 1)
Sketch uses 30386 bytes (92%) of program storage space. Maximum is 32768 bytes.
Global variables use 1127 bytes (55%) of dynamic memory, leaving 921 bytes for local variables. Maximum is 2048 bytes.
Writing | ################################################## | 100% 3.00s
avrdude: 31462 bytes of flash written
ATtiny3216 with ATWINC1500 can log data to server OK. But for SimpleWebServerWiFi, value always is 0 at this line
char c = bclient.read(); // read a byte, then
I surf in forum and found a link with similar problem at link below:
But it not help for my case because wifi101 only have two void for read below:
int WiFiClient::read()
{
uint8_t b;
if (read(&b, sizeof(b)) != 1) {
return -1;
}
return b;
}
int WiFiClient::read(uint8_t* buf, size_t size)
{
// sizeof(size_t) is architecture dependent
// but we need a 16 bit data type here
uint16_t size_tmp = available();
if (size_tmp == 0) {
return -1;
}
if (size < size_tmp) {
size_tmp = size;
}
int result = WiFiSocket.read(_socket, buf, size);
return result;
}
So, if anyone else can work with client.read(); for megaTinyCore, please add your comment and I very highly appreciate for your kind.
Or, if you have a driver library of ATWINC1500 with work for ATtiny3216 on microchipstudio7, please give me, I will try with it. I surf but I only found link for ATmega4808 and SAMD21, but I only need to on and off 3 output and log 5 value to server only, so, ATtiny3216 is best