Send a get request to my website

Hello, I am a beginner programmer, I want to send a GET request for my site
How should I do this?
im a beginner Please explain in detail
i want use arduino uno wifi.

read here for example

This tutorial is done using esp8266 and arduino. I use arduino uno wifi

i want send get request to my site with arduino uno wifi

since you don't have any script with you to start with, I suppose you need someone to do it for you at a price ?

If not then, you need to show (post here) what you have tried to so far

Which Arduino Uno do you have that has WiFi? Post an image of the unit along with any other info you may have on your Arduino Uno with WiFi.

thi is my arduino

I wanted to upload the blink code but I got an error

Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno WiFi"

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x51

Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x51

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x51



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

set the DIP switch correctly

what DIP switch? 1 and 2 on?

find the instructions for your board and read carefully, in the photo all the switches are in the off position

As an FYI. Did you notice the words written on the board by the TX and RX pins?

"ESP" <<<< Means your Uno is a ESP8266+Uno. Just as an FYI.

Yes i see tx and rx pins

i want upload this code to arduino uno wifi

#include <WiFiNINA.h>

char ssid[] = "your_SSID"; // your network SSID (name)
char password[] = "your_PASSWORD"; // your network password
int status = WL_IDLE_STATUS; // the WiFi radio's status
WiFiClient client; // the client to connect to the server

void setup() {
  Serial.begin(9600);
  while (!Serial); // wait for serial port to connect
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    while (true); // halt the program
  }
  status = WiFi.begin(ssid, password); // attempt to connect to the WiFi network
  if (status != WL_CONNECTED) {
    Serial.println("Failed to connect to the WiFi network!");
    while (true); // halt the program
  }
  Serial.println("Connected to the WiFi network!");
}

void loop() {
  if (!client.connect("your_server.com", 80)) { // connect to the server
    Serial.println("Failed to connect to the server!");
    while (true); // halt the program
  }
  client.println("GET /your_path HTTP/1.1"); // send the GET request
  client.println("Host: your_server.com");
  client.println("Connection: close");
  client.println(); // end the HTTP headers
  while (client.connected()) {
    if (client.available()) {
      char c = client.read();
      Serial.print(c); // print the response from the server
    }
  }
  Serial.println();
  client.stop(); // close the connection
  delay(5000); // wait for 5 seconds before sending another request
}

But I get an error

Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno WiFi"

In file included from C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/WiFiStorage.h:23:0,

                 from C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/WiFi.h:38,

                 from C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/WiFiNINA.h:23,

                 from C:\Users\user\AppData\Local\Temp\arduino_modified_sketch_429072\Blink.ino:1:

C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/utility/wifi_drv.h:293:12: error: 'PinStatus' does not name a type

     static PinStatus digitalRead(uint8_t pin);

            ^~~~~~~~~

exit status 1

Error compiling for board Arduino Uno WiFi.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

What data type is PinStatus?

static int PinStatus digitalRead(uint8_t pin);

Is it an int.?

static bool PinStatus digitalRead(uint8_t pin);

Is it a boolean type?

static float PinStatus digitalRead(uint8_t pin);

Is it a float type?

I can only guess what you intend the data type to be. Also the error message clearly states your issue.

A list of data types may help you decide,

Fundamental types - cppreference.com.

Just pick one to fix that error.

this is a error in arduino IDE i do not know

Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"

In file included from C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/WiFiStorage.h:23:0,

                 from C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/WiFi.h:38,

                 from C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/WiFiNINA.h:23,

                 from C:\Users\user\Desktop\arduino_uno_wifi\arduino_uno_wifi.ino:1:

C:\Users\user\Documents\Arduino\libraries\WiFiNINA\src/utility/wifi_drv.h:293:12: error: 'PinStatus' does not name a type

     static PinStatus digitalRead(uint8_t pin);

            ^~~~~~~~~

exit status 1

Error compiling for board Arduino Uno.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

thi is error

I take it you do not know how to declare variables?

Is PinStatus supposed to be a Boolean, a Integer, a float?

C Variables.

choose the right type of board, for this you need to install support for ESP8266.
Here is your code compiled

Creating BIN file "D:\SSS\arduino_build_420641/sketch_feb20a.ino.bin" using "D:\INSTALL\ARDUINO\arduino-1.8.19\portable\packages\esp8266\hardware\esp8266\3.1.1/bootloaders/eboot/eboot.elf" and "D:\SSS\arduino_build_420641/sketch_feb20a.ino.elf"
"D:\\INSTALL\\ARDUINO\\arduino-1.8.19\\portable\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "D:\\INSTALL\\ARDUINO\\arduino-1.8.19\\portable\\packages\\esp8266\\hardware\\esp8266\\3.1.1/tools/signing.py" --mode sign --privatekey "D:\\INSTALL\\ARDUINO\\arduino-1.8.19\\portable\\sketchbook\\sketch_feb20a/private.key" --bin "D:\\SSS\\arduino_build_420641/sketch_feb20a.ino.bin" --out "D:\\SSS\\arduino_build_420641/sketch_feb20a.ino.bin.signed" --legacy "D:\\SSS\\arduino_build_420641/sketch_feb20a.ino.bin.legacy_sig"
"D:\\INSTALL\\ARDUINO\\arduino-1.8.19\\portable\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -X utf8 -I "D:\\INSTALL\\ARDUINO\\arduino-1.8.19\\portable\\packages\\esp8266\\hardware\\esp8266\\3.1.1/tools/sizes.py" --elf "D:\\SSS\\arduino_build_420641/sketch_feb20a.ino.elf" --path "D:\\INSTALL\\ARDUINO\\arduino-1.8.19\\portable\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.1.0-gcc10.3-e5f9fec/bin" --mmu "-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000"
. Variables and constants in RAM (global, static), used 28608 / 80192 bytes (35%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1528     initialized variables
╠══ RODATA   1152     constants       
╚══ BSS      25928    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 60331 / 65536 bytes (92%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     27563    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 243120 / 1048576 bytes (23%)
║   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     243120   code in flash   
Используем библиотеку WiFiNINA-master версии 1.6.0 из папки: D:\INSTALL\ARDUINO\arduino-1.8.19\portable\sketchbook\libraries\WiFiNINA-master 
Используем библиотеку SPI версии 1.0 из папки: D:\INSTALL\ARDUINO\arduino-1.8.19\portable\packages\esp8266\hardware\esp8266\3.1.1\libraries\SPI 

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.