Manufaturação industrial
Internet das coisas industrial | Materiais industriais | Manutenção e reparo de equipamentos | Programação industrial |
home  MfgRobots >> Manufaturação industrial >  >> Manufacturing Technology >> Processo de manufatura

Construa um Companheiro LCD com IA: Seu Amigo Interativo

Componentes e Materiais

Arduino UNO 1
Potenciômetro rotativo (genérico) 1
Fios jumpers (genéricos) 19
Protoboard (genérico) 1
Botão 4
Resistor 100 ohm 3
Resistor 221 ohm 1
LCD Padrão Adafruit - 16x2 Branco no Azul 1

Aplicativos e Serviços Online

Sobre o Projeto

Para lhe dar um companheiro durante momentos de solidão.

Código

Você pode estender o código se quiser, basta postar o código estendido nos comentários! Copie e cole isto após "to be continued." -->

lcd.clear();
lcd.print("To be ");
lcd.setCursor(2, 2);
lcd.print("continued.");
delay(2000);
#include 
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int buttonPin = 9;
int buttonState = 0;
const int buttonPin2 = 10;
const int buttonPin3 = 8;

void setup() {
  pinMode(buttonPin, INPUT);
  pinMode(buttonPin2, INPUT);
  pinMode(buttonPin3, INPUT);
  lcd.begin(16, 2);
  lcd.print(" (.) (.) Hi I");
  lcd.setCursor(2, 2);
  lcd.print("(____) am Robi");
  delay(2000);
  lcd.clear();
  lcd.print(" (.) (.) You ");
  lcd.setCursor(2, 2);
  lcd.print(" ____ can talk");
  delay(2000);
  lcd.clear();
  lcd.print(" (-) (-) to ");
  lcd.setCursor(2, 2);
  lcd.print(" (____) me!");
  delay(2000);
  lcd.clear();
  lcd.print(" (.) (.)Tap");
  lcd.setCursor(2, 2);
  lcd.print(" ____ the");
  delay(2000);
  lcd.clear();
  lcd.print(" (.) (.) but");
  lcd.setCursor(2, 2);
  lcd.print(" (____) ton");
  delay(2000);
}

void loop() {
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
    lcd.clear();
    lcd.print("Hello I am");
    lcd.setCursor(2, 2);
    lcd.print("Alexander");
    delay(2000);
    lcd.clear();
    lcd.print(" (*) (*) Hi!");
    lcd.setCursor(2, 2);
    lcd.print(" (____)");
    delay(2000);
    lcd.clear();
    lcd.print(" (.) (.)Let's");
    lcd.setCursor(2, 2);
    lcd.print(" ____ play");
    delay(2000);
    lcd.clear();
    lcd.print("OK!");
    lcd.setCursor(2, 2);
    lcd.print(" But Where?");
    delay(2000);
    lcd.clear();
    lcd.print(" (.) (.) Park");
    lcd.setCursor(2, 2);
    lcd.print(" (____)or home?");
    delay(2000);
    lcd.clear();
    lcd.print("Left = Park");
    lcd.setCursor(2, 2);
    lcd.print("Right = Home");
    delay(2000);
  }

  buttonState = digitalRead(buttonPin2);
  if (buttonState == HIGH) {
    lcd.clear();
    lcd.print("You go to");
    lcd.setCursor(2, 2);
    lcd.print("the Park...");
    delay(2000);
    lcd.clear();
    lcd.print(" (.) (.) Lets");
    lcd.setCursor(2, 2);
    lcd.print(" ____ swing!");
    delay(2000);
    lcd.clear();
    lcd.print("OK!");
    lcd.setCursor(2, 2);
    lcd.print("You swing...");
    delay(2000);
    lcd.clear();
    lcd.print(" (*) (*) I'm");
    lcd.setCursor(2, 2);
    lcd.print(" (___) tired");
    delay(2000);
    lcd.clear();
    lcd.print("Me too!");
    lcd.setCursor(2, 2);
    lcd.print("Lets drink.");
    delay(2000);
    lcd.clear();
    lcd.print(" (.) (.) Yeah");
    lcd.setCursor(2, 2);
    lcd.print(" (____) ");
    delay(2000);
    lcd.clear();
    lcd.print("You go buy");
    lcd.setCursor(2, 2);
    lcd.print("a drink...");
    delay(2000);
    lcd.clear();
    lcd.print(" (*) (*) Ahh!");
    lcd.setCursor(2, 2);
    lcd.print(" ____ OW!!");
    delay(2000);
    lcd.clear();
    lcd.print("What?");
    lcd.setCursor(2, 2);
    lcd.print("...");
    delay(2000);
    lcd.clear();
    lcd.print(" (*) (*)Water");
    lcd.setCursor(2, 2);
    lcd.print(" []got in my eye");
    delay(2000);
    lcd.clear();
    lcd.print("To be ");
    lcd.setCursor(2, 2);
    lcd.print("continued.");
    delay(2000);
  }

  buttonState = digitalRead(buttonPin3);
  if (buttonState == HIGH) {
    lcd.clear();
    lcd.print("You go to");
    lcd.setCursor(2, 2);
    lcd.print("your home...");
    delay(2000);
    lcd.clear();
    lcd.print(" (.) (.) WOW!");
    lcd.setCursor(2, 2);
    lcd.print(" ___ Cool!");
    delay(2000);
    lcd.clear();
    lcd.print("You play for");
    lcd.setCursor(2, 2);
    lcd.print("the day...");
    delay(2000);
    lcd.clear();
    lcd.print("To be");
    lcd.setCursor(2, 2);
    lcd.print("continued.");
    delay(2000);
    lcd.clear();
  }
}

Esquemático

Construa um Companheiro LCD com IA: Seu Amigo Interativo

Processo de manufatura

  1. Construa seu Próprio Jogo UFO Attack com Arduino UNO e Display MAX7219
  2. Construa um Osciloscópio Arduino de 20 kHz em LCD Nokia 5110 – Guia DIY Fácil
  3. Persianas Inteligentes: Controle Automático de Luz com Arduino e Energia Solar
  4. Relógio 3D RGB Arduclock – Bluetooth, LEDs Endereçáveis e RTC
  5. Monitor de Saúde de Rios: Sistema de Qualidade da Água Baseado em Arduino
  6. Construa um Sensor de Obstáculos Simples com Arduino – Tutorial Fácil com LED IR e Fotodiodo
  7. Jogo Interativo com Joystick e Arduino – Feedback com LEDs
  8. Find Me: Localizador Inteligente de Objetos com Arduino e Bluetooth
  9. Osciloscópio DIY com Arduino Nano (10 Hz–50 kHz) e LCD 128×64
  10. Pequeno Rover com Arduino: Construa seu Próprio Robô Autônomo