Arduino Uno WiFi R4 with MIT App Inventor

Hello everyone!

I am currently working on my first project using the Arduino UNO R4 WiFi and trying to connect it to MIT App Inventor via Wi-Fi.

So far, I've managed to get the module to respond and even obtained an IP address, but I cannot make it communicate with MIT App Inventor. I couldn't find any blocks or extensions that support this specific board or its ESP32-S3 module.

My project is due in three weeks, so I’m doing my best to make things work.

Could someone from the team confirm if support for the Arduino UNO R4 WiFi is planned in MIT App Inventor? Or is there a workaround that I might have missed?

Any help or official information would be greatly appreciated.

Thanks in advance!

Can you provide more información of how the module responded to whom and how you obtained an ip address?
Note: I'm not familiar with that module...

Did you try the web component to communicate?
http://ai2.appinventor.mit.edu/reference/components/connectivity.html#Web

Taifun

Sure! I used the following code on my Arduino UNO R4 WiFi. I could see the IP address and connection details in the Serial Monitor after uploading the code and connecting to my mobile hotspot.

This code is only for connecting the board to Wi-Fi and checking that it works - it doesn’t yet handle any communication with MIT App Inventor.
I’m still trying to figure out how to connect the Arduino UNO R4 WiFi with MIT App Inventor, and whether the same blocks I used for ESP8266 will work here or not.

Here’s the code I used:

#include "WiFiS3.h"

// Replace with your Wi-Fi network credentials
char ssid[] = "Your_Hotspot_SSID"; // Enter your Wi-Fi hotspot SSID
char pass[] = "Your_Hotspot_PASSWORD"; // Enter your Wi-Fi hotspot password

void setup() {
  Serial.begin(115200); // Start Serial Monitor for debugging
  delay(1000);          // Allow some time for the Serial Monitor to initialize

  // Check for the WiFi module
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    while (true); // Stop here if no module is detected
  }

  // Attempt to connect to Wi-Fi
  Serial.print("Connecting to Wi-Fi");
  while (WiFi.status() != WL_CONNECTED) {
    WiFi.begin(ssid, pass);
    Serial.print(".");
    delay(1000); // Wait for 1 second before retrying
  }

  // Wi-Fi connected
  Serial.println("\nConnected to Wi-Fi!");
  printWifiStatus();
}

void loop() {
  // Nothing to do here; connection status will only print during setup
}

void printWifiStatus() {
  // Print the SSID of the network you're attached to
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // Print your board's IP address
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // Print the received signal strength
  long rssi = WiFi.RSSI();
  Serial.print("Signal strength (RSSI): ");
  Serial.print(rssi);
  Serial.println(" dBm");

  // Print where to go in a browser (if applicable)
  Serial.print("You can now access your device at: http://");
  Serial.println(ip);
}

Are you running a web server on that module?
Here is a similar thread

If yes, you can try the webviewer or the web component in App Inventor together with the url http://yourIpAddress

Taifun

I think you need to connect them both to an API, where the data's route will be

Arduino > API > MIT App

your API is like a bridge where your arduino will send/store the data there, and MIT App will retrieve

Good idea! I’ll try it out and update you after.

I actually tried using the WebViewer and Web component in MIT App Inventor before I followed a tutorial for the ESP8266 and set up similar blocks. But since I'm using an ESP32-S3 module, I’m not sure it works the same way with MIT. I’ll try jed_818’s idea to create a connection between the Arduino, API and MIT App first, and then experiment with simple blocks to transfer data. It might be more of a compatibility issue with how the module interacts with MIT.