Skip to content

GorgoGerbis/mrPing_prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mrPing_prototype

My repository for my prototype Home Lab using an Arduino R4 as the server. Just experimenting with connecting to the device and having it manipulate LEDs and display messages on an LCD.

Note: The two main .ino scripts in this repo (WiFi_LCD_Prototype.ino and WiFi_WebServer_LED_Blink.ino) were not written by me; they are based on example code provided by Arduino and other open-source resources. My main contributions are in adapting the code for my hardware setup, handling the wiring, and integrating the different components into a working prototype.

Resources:


Prototype-1: UDP Message Sending with LCD Display

alt text alt text

Wiring Diagram: Diagram NOT MINE

alt text

Prototype-0: WiFi LED Control Demo

Sets up the Arduino R4 as a Wi-Fi Access Point that hosts a simple web server. Users can connect to the access point and use a browser to control the onboard LED (turn it on/off).

alt text


How to Use

Part 1: WiFi LED Control

  1. Upload the Code:

    • Ensure your Wi-Fi credentials (SECRET_SSID and SECRET_PASS) are in the arduino_secrets.h file.
    • Upload the code to your Arduino R4 using the Arduino IDE.
  2. Connect to the Access Point:

    • Find the SSID you set in the arduino_secrets.h file.
    • Connect using the password from SECRET_PASS.
  3. Access the Web Interface:

    • Open a browser and go to the IP address shown in the Serial Monitor (default: 192.168.4.1).
    • Use the provided links to turn the LED ON or OFF.

Part 2: Sending Messages to Arduino

  1. Upload the UDP Code:

    • Upload the UDP code to your Arduino R4. Ensure your Wi-Fi credentials are correctly configured in the arduino_secrets.h file.
  2. Run the Python Script:

    • Use the provided Python script to send messages to the Arduino R4.
    • Example script:
      import socket
      import time
      
      server_ip = "192.168.4.1"  # Replace with your Arduino's IP
      server_port = 2390
      messages = ["Hello Arduino!", "Testing this out!", "Pretty cool!"]
      
      sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      
      for message in messages:
          sock.sendto(message.encode(), (server_ip, server_port))
          print(f"SENT MESSAGE TO: {server_ip} - {message}")
          time.sleep(2)  # Wait for 2 seconds before sending the next message
  3. View Messages on the LCD:

    • The messages sent from the Python script will appear on the Arduino's connected LCD screen.

About

My repo for my prototype Arduino R4 server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors