import board
import busio
import time
import digitalio
y=busio.UART(board.TX, board.RX, baudrate=115200)
LED = digitalio.DigitalInOut(board.D13)
LED.direction = digitalio.Direction.OUTPUT
LED.value = True
y.write(b'AT\r\n')
time.sleep(2)
print(y.read())
y.write(b'AT+CIPSTART=\"TCP\",\"l2022.infinityfreeapp.com\",80'+b'\r\n')
time.sleep(3)
print(y.read())
string='GET /postdata.php?proba=15'
string2=' HTTP/1.1\r\n'
string3='Host: l2022.infinityfreeapp.com\r\n'
string4='Connection: close\r\n'
lng=len(string+string2+string3+string4)
y.write(b'AT+CIPSEND='+str(lng)+b'\r\n')
time.sleep(2)
print(y.read())
y.write(bytearray(string))
time.sleep(1)
y.write(bytearray(string2))
time.sleep(1)
y.write(bytearray(string3))
time.sleep(1)
y.write(bytearray(string4))
time.sleep(1)
time.sleep(10)
print(y.read())
y.write(b'AT+CIPCLOSE\r\n')
time.sleep(5)
print(y.read())
<?php
$proba=($_GET['proba']);
require 'config.php';
$sql = "INSERT INTO testare(proba) VALUES('.$proba.')";
if($db->query($sql) === FALSE)
{ echo "Error: " . $sql . "<br>" . $db->error; }
echo "<br>";
echo $db->insert_id;
In this image, this 5 entry are send manually with the link in web-browser. In the REPL, all AT commands, return OK