This project demonstrates how to create random emotions and movements for an OLED display using the FluxGarage Robo Eyes library. It also integrates AI-generated human-like behaviors using an API.
- Displays random emotions and movements on an I2C OLED display.
- Connects to WiFi and fetches AI-generated emotions/actions via an API.
- Supports automated blinking and idle modes for the Robo Eyes.
- Microcontroller: Arduino Nano v3, ESP32, or similar.
- OLED Display: I2C OLED display with SH1106 chip.
- Other Components: Breadboard, jumper wires.
- SCL: Pin 22
- SDA: Pin 21
- Arduino IDE or PlatformIO.
- Libraries:
Adafruit_GFXAdafruit_SH110XFluxGarage_RoboEyesWiFiHTTPClientArduinoJson
- Install Required Libraries: Use the Arduino Library Manager to install the necessary libraries.
- Connect Hardware: Wire the OLED display to the microcontroller's I2C pins.
- Configure WiFi Credentials:
- Update the
ssidandpasswordvariables with your WiFi credentials.
- Update the
- Configure API Credentials:
- Update the
apiEndpointandapiKeyvariables with your API endpoint and key.
- Update the
- Upload Code: Compile and upload the code to your microcontroller.
- WiFi Connection: Connects to a WiFi network.
- API Integration: Fetches AI-generated emotions/actions from an API.
- Robo Eyes: Displays emotions and animations on the OLED display.
setup(): Initializes the WiFi, OLED display, and Robo Eyes library.getHumanLikeBehavior(): Fetches a human-like emotion or action from the API.loop(): Updates the Robo Eyes display with random emotions or actions at intervals.
HAPPYANGRYTIREDCONFUSEDLAUGHING
- The OLED display will show random emotions or animations based on AI suggestions.
- Serial Monitor will log the current mood and other debug information.
- Ensure the correct I2C address is uncommented in the code (
0x3Cor0x3D). - If the API key is missing or invalid, the code will default to a blank response.
This project is published under the MIT License.
Published in April 2025 by [kingsmen732].