Project tutorial
Robo Hazel using Arduino and WIZnet S2E

Robo Hazel using Arduino and WIZnet S2E

Robo Hazel is a robot prototype made using Arduino and WIZnet S2E module to advance industry 4.0 and solve the problem of message delivery.

  • 504 views
  • 0 comments
  • 4 respects

Components and supplies

Apps and online services

About this project

PROJECT MOTIVATION:

Few days before, I was searching the current trends of automation and data exchange in manufacturing technologies. I found a lot of complex informative stuff related to the Internet of things, cloud computing and cognitive computing on internet. But I was trying to find out simplest possible solutions for some common issues that people face in an industry.

After some brainstorming, a basic industrial problem popped into my head, I wondered how a department head of a big busy industry convey his message or a document to his employee (or labor) who has no messaging service at his workplace. If his employee is working at a distant place from his office, the head has to go there himself or he will send a person to convey his message (or a document) to his labor. Why don't we automate this task for him and advance Industry 4.0 using Arduino?

So, I had an idea to make a text-to-speech robot to convey messages or deliver documents to workers in industries. After lots of sleepless nights, I brought this idea into reality and when my robot opened her eyes for the first time, I called her 'Hazel'.

BREIF OVERVIEW:

Robo Hazel works by receiving a message from her control page, which is made using a WIZ750SR (Serial to Ethernet Module by Wiznet) as shown in the screenshot below.

User can type any text at Hazel’s control page and click Announce button. Hazel is placed anywhere at a starting position, she receives the text (which user has typed on her control page) with the help of a Python program. Meanwhile, the robot starts moving and the Python program converts that text into speech. After reaching the final position (her destination), Hazel stops and speaks the text as shown in the video below. Hazel reaches to final position from her initial position by following a line.

Working video of Robo Hazel

So, a department head can type any message which he wants to convey to his employee on Hazel’s control page. Hazel will receive this text, convert it into speech, reach to the employee by following a line, convey her message (speaks the text) and the task is automated!

Things We Need

First of all we need two Arduino UNOs:

  • One to be used at the user side with WIZ750SR (Serial to Ethernet Module by Wiznet).
  • The other one for Hazel’s hardware. It is used for controlling robot’s locomotion and for sending signals to the tablet PC to which it is attached serially via USB A to B cable and USB to Otg cables. The Python application is stored in the tablet PC which receives the signals from this Arduino serially. ( Note: If you did not understand this point, don’t worry it will be cleared as you proceed further in this tutorial)

Then, we need a WIZ750SR-TTL-EVB kit. It consists of WIZ750SR-TTL (3.3V TTL ver.), evaluation board, and cables. WIZ750SR is a compact sized serial to Ethernet module using the W7500P Ethernet MCU (SoC based on ARM Cortex-M0 architecture). Visit the following link for product details, datasheet and more information.

https://wizwiki.net/wiki/doku.php?id=products:wiz750sr:overview:start#wiz750sr_evaluation_board_series

Then, we need any tablet PC that can be used as robot’s face. I used my Haier Y11B windows tablet PC but you can use any tablet of your choice.

Other components are mentioned in the Things heading of this tutorial.

Block Diagram of System’s Connections

USER SIDE:

One of our Arduinos (1) is connected to our serial to ethernet module i.e. WIZ750SR (2) as shown in fig. 1. Then we have a router (3) that is connected to our module and PC (4) as shown in fig. 2. The control page (5) of our robot (i.e. a server made using Arduino and WIZ750SR) can be opened in a web browser on user’s PC by typing the ip address.

ROBOT SIDE:

The second Arduino (6) is used on the robot side to control robot’s locomotion and send the signal to python application in tablet PC (7) with the help of USB A to B and micro USB to Otg cables (8) as shown in fig. 3.

GETTING STARTED:

Configuring WIZnet’s WIZ750SR

We have to configure our WIZ750SR using WIZnet’s configuration tool which enables product search, product settings, and firmware upload via the network.

WIZ750SR is compatible with WIZ107/108SR and uses the same configuration tools. The tool can be downloaded from the following link.

http://www.wiznet.io/wp-content/uploads/wiznethome/S2E%20Module/WIZ107_108SR/Utility/WIZ107_108_config_tool.zip

Now, plug your WIZ750SR module into the WIZ750SR-EVB board and connect it with your router with a LAN cable as shown in fig. 2. A blue LED will glow indicating that the connection is made. Connect Micro USB Type B Cable with your PC to power on WIZ750SR-EVB board and open your configuration tool. Your device will be shown when you click Search button at the top.

You can set the requirements of the device using this configuration tool. For my project I changed the settings as follows:

  • Operation mode: TCP server
  • Subnet mask:255.255.255.0
  • Local port: 80
  • Baud rate: 115200
  • Data bit: 8
  • Parity: None
  • Stop bit: 1
  • Flow control: none
  • Inactivity timer: 1

I opened the command prompt and type ipconfig, the IPv4 Address was 192.168.1.104. So, I assigned it to my WIZnet device.

You can also use any software like Angry IP Scanner to get your ip address by giving an ip range.

After changing the settings, click SETTING button in the configuration tool to update new settings.

Configuring WIZ750SR is also explained in WIZnet’s Getting Started Guide.

If you want to use the latest version of configuration tool, you can download it from the following link:

https://github.com/Wiznet/WIZnet-S2E-Tool

Connecting WIZ750SR with Arduino UNO

First of all, we have to bypass RS232 converter modules by using the following jumper settings.

Now, connect one end of your serial cable with your WIZ750SR-EVB board. The other end of our serial cable is. a female connector with the following pin configuration.

We now need to go to Arduino online web editor. Go to the following link:

https://create.arduino.cc/

Or you can download Arduino from the following link:

https://www.arduino.cc/en/Main/Software

Upload the code that I have attached in this tutorial into your Arduino UNO board using Arduino’s web editor.

Now, connect Rx pin of female connector with Tx pin of your Arduino UNO board, the Tx pin of female connector to Rx pin of your Arduino and short the ground pins.

Note: Remove Rx/Tx connections before uploading the code in Arduino.

Now after powering it on, go to the IP address that you have assigned to your WIZ750SR. In my case it is 192.168.1.104 and I used google chrome web browser to access this IP address.

As shown in the screenshot above we have made a server using Arduino and WIZ750SR serial to ethernet module. Arduino sends serial data i.e. an html form, using Rx/Tx pins to the module which transmits it across an ip address. Now, whenever a user types the ip address assigned to WIZ750SR in a web browser an html form is displayed.

You can see that there is nothing written in front of MESSAGE TO BE ANNOUNCED heading when we opened this page for the very first time. This is because we have not typed any message yet. Now when we type any message and click Announce button the message string is sent in the URL as we have used a GET HTTP Method. To learn about HTTP METHODS (GET and POST) click here.

URL of this page can be noticed after we have clicked the Announce button in the screenshot below.

Now, our Arduino code reads the URL, filters the message from it and stores it in the EEPROM of Arduino using the following lines of code:

 //Reading the request
         String request = Serial.readStringUntil('\n');  
         request.replace('+', ' '); //Removing all the plus signs in message
         //Parsing message from request
         int firstIndex = request.indexOf('Message=');
         int lastIndex = request.indexOf('&_', firstIndex + 1);
         //Saving the parsed message into output variable
         String output=request.substring(firstIndex + 1, lastIndex-1); 
         //Checking if the message exists and writing it into Arduino's EEPROM for future use
         if(lastIndex-firstIndex>1){ 
             output.toCharArray(myStringChar, BUFSIZE);
             strcpy(buf1, myStringChar);  
             eeprom_write_string(0, buf1);
         } 

Now, if we go to Hazel's control page by typing that ip address again. The following lines will read the last message that was stored in Arduino's EEPROM and displays it in front of MESSAGE TO BE ANNOUNCED heading.

        //Reading and displaying the message that was stored in Arduino's EEPROM earlier
        Serial.print("<P>");
        Serial.print("MESSAGE TO BE ANNOUNCED: ");   
        eeprom_read_string(0, buf2, BUFSIZE);
        Serial.print(buf2);
        Serial.print("</P>");

Following is the screenshot after reloading the page.

Now, right click on the page and go to VIEW PAGE SOURCE.

The following tab will be opened.

This is the page source. The paragraph from this page i.e a text to be spoken by our Hazel is then scrapped by Python program of our robot where this text is converted into speech (and stored in a temporary audio file) while our robot is walking and it is spoken (the temporary audio file is played) when the robot reaches its targeted location.

So, we have used made a connection between Arduino UNO and WIZ750SR to make a webserver and used EEPROM of Arduino to save text which is then fetched by our robot.

Robo Hazel’s hardware, circuit and program

Arduino is connected to tablet PC (which serves as a face of Robo Hazel) with USB A to B and micro USB to Otg cables as shown in the picture below.

Now, we need two DC motors, a motor driver (L298N H-Bridge), three IR sensors, a battery, a breadboard and an Arduino UNO. Connect all the components with Arduino UNO according to the following schematic.

Upload the code for robot side in your Arduino UNO. I have attached the code in this tutorial using Arduino Web editor. (https://create.arduino.cc/)

Now, to make robot’s body we can use a wooden base, a PVC pipe, plastic dustbin, small wheels and any tablet holder (to be used as neck of robot) as shown in pictures below.

IR sensors are attached at the front of robot with which she follows the black line path to reach the final position from its initial position.

Robo Hazel circuit

Following is the robot’s locomotion test.

Robot’s locomotion test

SELECTING MOTORS AND BATTERY:

I used high torque DC motors and a 12V - 7A battery for my final product. You have to select motors and battery considering the size and weight of your robot's body.

LINE FOLLOWER:

Hazel reaches the targeted location, where she speaks the text, by following a black line path using IR sensors. So, now we are going to discuss the line follower part of our robot.

So far, we have seen that Hazel receives the text from its control page with the help of a Python program and converts the text into speech during her journey to the targeted location where it speaks the text.

When the robot is turned on it prints "Message: Announce" once on the serial port that is read by Python program in our tablet PC as the Arduino is connected serially with our tablet PC. After reading this message, python program starts converting the text to speech.

static bool once = false;
   if (once == false)
{
   once = true;
   Serial.println("Message: Announce"); 
}

Meanwhile, Hazel reaches the final position by following a black line path with the help of three IR sensors. The following lines of code helps her in following a line.

  if ((S0sensor == LOW)&&(S1sensor == HIGH)&&(S2sensor == LOW))
  motfwd();
  else if ((S0sensor == HIGH)&&(S1sensor == LOW)&&(S2sensor == LOW))
  motright();
  else if ((S0sensor == LOW)&&(S1sensor == LOW)&&(S2sensor == HIGH))
  motleft();

After reaching the final position Hazel stops and prints "Signal: 1 1 1" that is again read by the python program and Hazel speaks the text whenever she gets this signal.

 else if ((S0sensor == HIGH)&&(S1sensor == HIGH)&&(S2sensor == HIGH))
  {
   motstop();
  Serial.println("Signal: 1 1 1");
  delay(1000*15);
  }

Hazel stops where all of her three sensors are on a black finish box as shown in the figure below.

Robo Hazel’s Python Software

The IDE used for Python programming in our project is PyCharm that can be downloaded from:

https://www.jetbrains.com/pycharm/

The program attached in this tutorial that can be downloaded and run on our tablet PC which is attached serially (using cable) with the robot’s hardware (Arduino UNO).

Python program is based on pygame module. This program continuously reads the serial port using serial module. When Hazel is turned on, she gets a signal 'Message: Announce' from Arduino (arduino writes it on serial port) after which she scraps the text to be spoken (i.e. a paragraph) from Hazel's webpage using web scrapping technique. The program then converts the text into speech using gTTS module and saves it in a temporary audio file. Meanwhile, the robot moves towards her final position. Now, when Hazel reaches the targeted location, Python program gets a signal 'Signal: 1 1 1' from Arduino and only then she stops and speaks the text (plays temporary audio file).

if (ser.isOpen()):
    string=ser.readline().decode('ascii')
    print(string)
    if len(string)>0:
        for i in range(0, len(string)):
            if string[i] == ':':
                check = string[i - 1]
                if check == 'e': #Finds this signal --> Message: Announce, from arduino and starts extracting the message from the webpage and converting it to speech
                    try:
                        url = "http://192.168.1.104"
                        values = {'s': 'basics',
                                  'submit': 'search'}
                        data = urllib.parse.urlencode(values)
                        data = data.encode('utf-8')
                        req = urllib.request.Request(url, data)
                        resp = urllib.request.urlopen(req)
                        respData = resp.read()
                        paragraph = re.findall(r'<p>(.*?)</p>', str(respData))
                        for eachP in paragraph:
                            serial_message = eachP
                    #Exception handling in case of BadStatusLine exception (Extracting the message from error)
                    except Exception as e:
                        output = str(e)
                        for i in range(0, len(output)):
                            if output[i] == '>':
                                break
                        initial = i
                        for j in range(i, len(output)):
                            if output[j] == '<':
                                break
                        final = j
                        serial_message = output[initial + 26:final]
                    #Converting the text to speech
                    tts = gTTS(text=serial_message, lang='en-us')
                    mixer.init()
                    sf = TemporaryFile()
                    tts.write_to_fp(sf)
                    sf.seek(0)
                    mixer.music.load(sf)
                    pygame.time.Clock().tick(10)
                if check == 'l': #Finds this signal --> Signal: 1 1 1, from arduino and the text that was converted into speech earlier is spoken
                    mixer.music.play()
                    while pygame.mixer.music.get_busy():
                        print("Playing")
                        pygame.time.Clock().tick(10)

GRAPHICS:

Adobe Photoshop is used to design the eyes of Robo Hazel. A close and an open eye is designed and they are programmed to blink using Python.

Conclusion

In the whole, a user types any text on Hazel’s control page that is made using WIZ750SR and Arduino UNO. This text is stored in Arduino’s EEPROM and it is also displayed on her webpage. Now, when the robot is tuned on, Python program gets a signal after which it reads the text (typed by user on Hazel’s control page) by using web scrapping technique and converts this text to speech and saves it in a temporary audio file. Meanwhile, Hazel starts moving towards the final position where she has to speak this text. After reaching the final position, Python application gets a signal from Arduino UNO again, Hazel stops and speaks the text i.e. the temporary audio file is played.

In this way, I made a prototype of this advanced robotic system which solved the common problem of message delivery in an industry.

Code

Arduino - User SideC/C++
#include <EEPROM.h>

//Using Arduino's EEPROM to read and write the message. Following are the functions for reading and writing from EEPROM
const int EEPROM_MIN_ADDR = 0;
const int EEPROM_MAX_ADDR = 511;

boolean eeprom_is_addr_ok(int addr) {
      return ((addr >= EEPROM_MIN_ADDR) && (addr <= EEPROM_MAX_ADDR));
}

boolean eeprom_write_bytes(int startAddr, const byte* array, int numBytes) {
      int i;
      if (!eeprom_is_addr_ok(startAddr) || !eeprom_is_addr_ok(startAddr + numBytes)) {
      return false;
      }
      for (i = 0; i < numBytes; i++) {
      EEPROM.write(startAddr + i, array[i]);
      }
      return true;
}

boolean eeprom_write_string(int addr, const char* string) {
      int numBytes; 
      numBytes = strlen(string) + 1;
      return eeprom_write_bytes(addr, (const byte*)string, numBytes);
}

boolean eeprom_read_string(int addr, char* buffer, int bufSize) {
      byte ch; 
      int bytesRead;
      if (!eeprom_is_addr_ok(addr)) {
      return false;
      }
      
      if (bufSize == 0) { 
      return false;
      }
      if (bufSize == 1) {
      buffer[0] = 0;
      return true;
      }
      bytesRead = 0; // initialize byte counter
      ch = EEPROM.read(addr + bytesRead); // read next byte from eeprom
      buffer[bytesRead] = ch; // store it into the user buffer
      bytesRead++; 
      while ( (ch != 0x00) && (bytesRead < bufSize) && ((addr + bytesRead) <= EEPROM_MAX_ADDR) ) {
      // if no stop condition is met, read the next byte from eeprom
      ch = EEPROM.read(addr + bytesRead);
      buffer[bytesRead] = ch; // store it into the user buffer
      bytesRead++; // increment byte counter
      }
      
      if ((ch != 0x00) && (bytesRead >= 1)) {
      buffer[bytesRead - 1] = 0;
      }
      return true;
}

const int BUFSIZE = 100;
char buf1[BUFSIZE];
char buf2[BUFSIZE];
String myString; 
char myStringChar[BUFSIZE];

//HTML form
const char webpage[] PROGMEM  = "<!DOCTYPE HTML>"
"<HTML>"
"<H1>Robo Hazel </H1>"
"<FORM ACTION=\"http://192.168.1.104\" method=get > "
"Message: <INPUT TYPE=TEXT NAME=\"Message\" VALUE=\"\" SIZE=\"100\" MAXLENGTH=\"100\"><BR>"
"<INPUT TYPE=SUBMIT NAME=\"_submit\" VALUE=\"Announce\">"
"</FORM>"
"</HTML>";

int k;    // counter variable
char myChar;

void setup() {
  
  Serial.begin(115200);

}

void loop() {
       
  while (!Serial);  // wait for serial port to connect.

         //Reading and displaying the message that was stored in Arduino's EEPROM earlier
         Serial.print("<P>");
         Serial.print("MESSAGE TO BE ANNOUNCED: ");   
         eeprom_read_string(0, buf2, BUFSIZE);
         Serial.print(buf2);
         Serial.print("</P>");

          //Printing the HTML form 
          for (k = 0; k < strlen_P(webpage); k++) 
          {
            myChar =  pgm_read_byte_near(webpage + k);
            Serial.print(myChar);
          }
          Serial.println();
          delay(800);

          //Reading the request
          String request = Serial.readStringUntil('\n');  
          request.replace('+', ' '); //Removing all the plus signs in message
          
          //Parsing message from request
          
          int firstIndex = request.indexOf('Message=');
          int lastIndex = request.indexOf('&_', firstIndex + 1);

          //Saving the parsed message into output variable
          String output=request.substring(firstIndex + 1, lastIndex-1); 
          
          //Checking if the message exists and writing it into Arduino's EEPROM for future use
         
          if(lastIndex-firstIndex>1){ 
              output.toCharArray(myStringChar, BUFSIZE);
              strcpy(buf1, myStringChar);  
              eeprom_write_string(0, buf1);
          }
          
      }
 
Arduino-Robot sideC/C++
int S0 = 2, S1 = 3, S2 = 4; //IR sensors
int S0sensor,S1sensor,S2sensor; //Variable declaration of sensors

int motRight1= 7 ;
int motRight2= 8; 
int motRightpwm= 6 ;
int motLeft1= 12;
int motLeft2= 13 ;
int motLeftpwm= 11;

//Calibrate the PWM values of your motors to adjust speed until the robot goes straight
int rightPWM = 250; //PWM value of right motor
int leftPWM = 68; //PWM value of left motor

//Functions declaration
void motfwd();
void motbwd();
void motright();
void motleft();
void motstop();

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);

  pinMode(S0, INPUT);
  pinMode(S1, INPUT);
  pinMode(S2, INPUT);
  
  pinMode(motRight1,OUTPUT);
  pinMode(motRight2,OUTPUT);
  pinMode(motRightpwm,OUTPUT);
  pinMode(motLeft1,OUTPUT);
  pinMode(motLeft2,OUTPUT);
  pinMode(motLeftpwm,OUTPUT);
 int count = 0;
}

void loop() {

 /* When the robot is started "Message: Announce" is printed once which gives the signal to
  * the python application to get the message to be spoken from the server and convert the 
  * text into speech.
  */ 
 static bool once = false;
    if (once == false)
{
    once = true;
    Serial.println("Message: Announce"); 
}

  //Reading the values of IR sensors
  S0sensor = digitalRead(2);
  S2sensor = digitalRead(3);
  S1sensor = digitalRead(4); 


  //------------COMMANDS TO FOLLOW A BLACK LINE PATH ------------//
   if ((S0sensor == LOW)&&(S1sensor == HIGH)&&(S2sensor == LOW))
   motfwd();
   else if ((S0sensor == HIGH)&&(S1sensor == LOW)&&(S2sensor == LOW))
   motright();
   else if ((S0sensor == LOW)&&(S1sensor == LOW)&&(S2sensor == HIGH))
   motleft();

  /*When the robot reaches its final position it stops and "Signal: 1 1 1" 
   * is printed which gives a signal to python application to announce
   * speak the text that had been converted to speech earlier.
   */
   else if ((S0sensor == HIGH)&&(S1sensor == HIGH)&&(S2sensor == HIGH))
   {
    motstop();
   Serial.println("Signal: 1 1 1");
   delay(1000*15);
   }
   
}

void motfwd(){
digitalWrite(motRight1,LOW);
digitalWrite(motRight2, HIGH);
analogWrite(motRightpwm, rightPWM);
digitalWrite(motLeft1,HIGH);
digitalWrite(motLeft2, LOW);
analogWrite(motLeftpwm, leftPWM);
  }
void motleft(){
digitalWrite(motRight1,LOW);
digitalWrite(motRight2, HIGH);
analogWrite(motRightpwm, rightPWM);
digitalWrite(motLeft1,HIGH);
digitalWrite(motLeft2, HIGH);
analogWrite(motLeftpwm, leftPWM);
  }
  void motright(){
digitalWrite(motRight1,HIGH);
digitalWrite(motRight2, HIGH);
analogWrite(motRightpwm, rightPWM);
digitalWrite(motLeft1,HIGH);
digitalWrite(motLeft2, LOW);
analogWrite(motLeftpwm, leftPWM);
  }
  void motbwd()
  {
digitalWrite(motRight1,LOW);
digitalWrite(motRight2, HIGH);
analogWrite(motRightpwm, rightPWM);
digitalWrite(motLeft1,HIGH);
digitalWrite(motLeft2, LOW);
analogWrite(motLeftpwm, leftPWM);
  }
   void motstop()
  {
digitalWrite(motRight1,LOW);
digitalWrite(motRight2, LOW);
digitalWrite(motLeft1,LOW);
digitalWrite(motLeft2, LOW);

  }
Python Software for tablet PCPython
from gtts import gTTS
import pygame
from pygame import mixer
from tempfile import TemporaryFile
import serial
import os
import time
import urllib.parse
import re

#The arduino is connected to COM12 of our tablet PC and the baudrate is 9600
ser = serial.Serial(port='COM12', baudrate=9600, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, timeout=10)

pygame.init()

black = (0,0,0)
white = (255,255,255)

gameDisplay = pygame.display.set_mode((0,0),pygame.FULLSCREEN))
pygame.display.set_caption('Robo Hazel')
clock = pygame.time.Clock()
CurrentPath = os.path.dirname(__file__)
eyeFolderPath = os.path.join(CurrentPath, 'images')
m1 = pygame.image.load(os.path.join(eyeFolderPath, 'opened.png'))
m2 = pygame.image.load(os.path.join(eyeFolderPath,"closed.png"))
eyeCurrentImage = 1

def gameloop(eyeCurrentImage):
    gameExit = False

    while not gameExit:
        for event in pygame.event.get():
             if event.type == pygame.QUIT:
                 gameExit = True
        gameDisplay.fill(white)

        #Blinking of eyes
        if (eyeCurrentImage == 1):
            gameDisplay.blit(m1, (200, 200))
            time.sleep(0.5)
        if (eyeCurrentImage == 2):
            gameDisplay.blit(m2, (200, 200))
            time.sleep(3)
        if (eyeCurrentImage == 2):
            eyeCurrentImage = 1
        else:
            eyeCurrentImage += 1

        #Reading messages from the serial port
        if (ser.isOpen()):
            string=ser.readline().decode('ascii')
            print(string)
            if len(string)>0:
                for i in range(0, len(string)):
                    if string[i] == ':':
                        check = string[i - 1]
                        if check == 'e': #Finds this signal --> Message: Announce, from arduino and starts extracting the message from the webpage and converting it to speech
                            try:
                                url = "http://192.168.1.104"
                                values = {'s': 'basics',
                                          'submit': 'search'}
                                data = urllib.parse.urlencode(values)
                                data = data.encode('utf-8')
                                req = urllib.request.Request(url, data)
                                resp = urllib.request.urlopen(req)
                                respData = resp.read()
                                paragraph = re.findall(r'<p>(.*?)</p>', str(respData))
                                for eachP in paragraph:
                                    serial_message = eachP

                            #Exception handling in case of BadStatusLine exception (Extracting the message from the error itself)
                            except Exception as e:
                                output = str(e)
                                for i in range(0, len(output)):
                                    if output[i] == '>':
                                        break
                                initial = i
                                for j in range(i, len(output)):
                                    if output[j] == '<':
                                        break
                                final = j
                                serial_message = output[initial + 26:final]

                            #Converting the text to speech
                            tts = gTTS(text=serial_message, lang='en-us')
                            mixer.init()
                            sf = TemporaryFile()
                            tts.write_to_fp(sf)
                            sf.seek(0)
                            mixer.music.load(sf)
                            pygame.time.Clock().tick(10)
                        if check == 'l': #Finds this signal --> Signal: 1 1 1, from arduino and the text that was converted into speech earlier is spoken
                            mixer.music.play()
                            while pygame.mixer.music.get_busy():
                                print("Playing")
                                pygame.time.Clock().tick(10)

        pygame.display.flip()
        clock.tick(120)

gameloop(eyeCurrentImage)
pygame.quit()
quit()

Custom parts and enclosures

Eye opened
3643271528058409071 z4wijcsr9o
Eye closed
Closed lqxiosnhd8

Schematics

Robot circuit
Robo hazel bb ldv1k3kvks
WIZ750SR Pinout
Wiz750sr all pinout 20160628 z1lopqixjd

Comments

Similar projects you might like

WIZnet S2E Light Control

Project tutorial by Team S2ELighting

  • 1,449 views
  • 0 comments
  • 7 respects

WIZnet S2E Deadbolts

Project tutorial by S2E Lock

  • 3,212 views
  • 0 comments
  • 9 respects

WIZnet Controlled Robotic Arm

Project tutorial by Md. Khairul Alam

  • 1,616 views
  • 0 comments
  • 12 respects

Nero: A Smart Glove That Controls Remote Devices

Project tutorial by Team Nero

  • 2,567 views
  • 4 comments
  • 76 respects

Pranked! Moving Tissue Box | Circuito.io

Project tutorial by Arduino “having11” Guy

  • 3,956 views
  • 1 comment
  • 18 respects

Factory/Warehouse/Control Shed/ Environment Monitoring

Project tutorial by Muhammad Afzal

  • 1,677 views
  • 0 comments
  • 7 respects
Add projectSign up / Login