CodeLabs
  • Introduction
  • Cities
    • Cover
    • Summary
    • Introduction
      • Getting Started
      • Resources
      • Naming Convention
    • Caracol
      • Architecture
        • Intel
        • Operating Systems
        • Hardware Platform
        • Field Requirements
        • Software Development
        • Video Conference Station
          • Applications
          • Entertainment System
            • Services
              • Graphics
              • Video
              • Camera
              • Text To Speech
              • Speech To Text
              • Photography
              • Gaming
                • Super Nintendo Emulators
                • Super Nintendo ROMs
              • Twitter
              • Keyboard
              • Google Drive
              • WiFi
            • Modules
            • Tbd
        • Functionality
        • Bill Of Materials
        • Open Questions
        • Future
    • Chacmultun
      • JHD1313M1
        • Background
          • Inter-Integrated Circuit
          • Linux I2C Subsystem
        • Device Drivers
          • User Space Library UPM
          • User Space Library MRAA
          • User Space I2C Library
          • Kernel Space I2C Driver
    • Chicanna
      • OpenCV
        • Face Recognition
        • Web Streaming
    • Chichen Itza
      • Audio
        • Advanced Linux Sound Architecture
        • PortAudio
        • PyAudio
          • Record
          • Play
      • Text To Speech
        • eSpeak
          • pyttsx
        • VoiceRss
          • VoiceRss Text To Speech Python SDK
      • Speech To Text
        • CMU Sphinx
          • Sphinx Knowledge Base Tool
          • PocketSphinx
          • PyAudio
        • SpeechRecognition
    • Coba
      • Linux Kernel Source Code
        • Git Source Code Management
      • Linux Kernel Development Process
        • A Guide To The Linux Kernel Development Process
        • Challenge
      • Linux Kernel Compilation
      • Linux Kernel Modules
      • Linux Kernel Build System
        • Compilation Kernel Object
        • Compilation Built-In
      • Linux Kernel Patch
        • Patchset
      • Linux Kernel Developer
      • Learn More
    • Dos Pilas
    • Dzibilchaltun
    • Edzna
      • MQ Telemetry Transport
        • MQTT Broker
      • Home Assistant
        • Setup
        • Default Configuration
        • Hello
      • Home Automation
        • Device
          • Light ESP8266
          • Intel Edison
        • Server
          • MQTT
            • Light
            • Sensor
            • Binary Sensor
            • Alarm
          • Dweet
          • Weather
          • Binary Sensor
          • Telegram
          • Camera
          • Automation
      • Shack Automation
        • Configuration Yaml
    • Ek Balam
      • Google Cloud Platform
        • Google API Keys
        • Google Application Default Credentials
      • Google Cloud Translation API
      • Google Cloud Vision API
      • Google Cloud Speech
    • Hochob
      • Introduction
      • Accounts
      • Areas
        • Naming Conventions
      • Digital Media Players
        • Chromecast
      • Keypads
      • Mobile Device
      • Amikoo
        • Architecture
          • Hardware Components
            • IntelĀ® Edison Breakout Board
        • Amikoo
          • Setup
          • Git Repositories
          • Audio
          • Main Intel Edison
          • Main x86
        • Sandbox
          • Tbd
      • Server
        • Setup
          • Root
          • PulseAudio
        • Architecture
        • Media
        • Services
          • Automation
            • Home Assistant
              • Setup
          • Calendar
          • Camera
          • Communications
          • Games
            • Loteria Mexicana
            • Caras Y Gestos
            • Sopa De Letras
          • Image
          • Institution
          • Keypad
          • Messaging
          • Motion
          • Robot
          • Sound
            • Play
            • Speech Synthetizer
          • Stream
          • Usb
          • Survey
        • Applications
          • Captain Maya Lands
          • Southern Maya Highlands
          • Amikoo Maya Lands
          • Central Maya Lowlands
          • Northern Maya Lowlands
          • Console Maya Lands
          • Media Maya Lands
          • Calendar Maya Lands
          • Tradition Maya Lands
          • Techie Maya Lands
          • NohochTata Maya Lands
      • Stations
      • Architecture
      • Release Notes
        • v0.1
        • v0.2
    • Hormiguero
    • Kaminaljuyu
      • WRI Workshop
        • Environmental Protection Agency
      • Arquitecture
        • Bill Of Materials
      • Intel
    • Kanki
      • Device
      • Gateway
    • Kinich KaK Moo
    • Kohunlich
    • La Ruta Puuc
    • Mayapan
    • Mixco Viejo
    • Muyil
    • Palenque
    • Qumarkaj
      • Amazon
      • Amazon Echo
        • Lifx
        • IFTTT
      • Amazon Alexa
        • Alexa Skills Kit
          • Training: Developing Alexa Skills - Hello, Alexa!
          • Training: Alexa - A Free Introduction
          • Projects
            • Intel GDC Visitor Center
              • Cloudy
              • Geek
              • Trivia
              • Kit
            • Voice Control Intel Edison
        • Alexa Voice Service
          • Intel Edison
    • Seibal
    • Tabasqueno
    • Tikal
      • Mexican Red Cross
      • Emergency Medical Services
        • Prehospital Care Strategies
      • Intel
      • Bitalino
      • My Signals
      • Architecture
        • Objectives
    • Tulum
      • Introduction
      • Device
        • Development Board
        • Telegram Bot
        • Bootup
        • Text Editors
        • Setup
        • Main
        • IoT101 Inc
        • Mqtt Clients
        • Sensors
      • Server
        • Setup
        • Dashboard
        • Mqtt Broker
      • Challenge
    • Uxmal
    • Xcambo
    • Xpuhil
    • Xunantunich
    • Sandbox
      • Text To Speech
      • Face Recognition Web Streaming
      • Web Server Flask
      • Speech To Text
      • Image Webpage Flask
      • Audio Capture Playback
      • Image Capture OpenCV
    • Tbd
      • Tbd
      • Linux Kernel Architecture
      • Linux Kernel Device Drivers
      • Tbd
  • Gods
    • Acat
      • Node-RED
        • Installation
          • General
          • Base
          • Npm Packages
          • Node-RED Packages
        • Autostart
      • Projects
        • GPIO
        • MQTT
        • Intel GDC Visitor Center
      • Sandbox
    • Ah Puch
      • Recon Instruments
        • ReconJet
          • Get Started
        • ReconEngage
        • Uplink
        • Intel Developer Zone
          • Recon Dev Kit for Jetā„¢
      • Bicycles
    • Akna
      • Hardware
        • Intel Edison
        • Sphero
        • Bluetooth Dongle
      • Software
        • Javascript
        • Cylon.js
          • Cylon.js Intel Edison
          • Cylon.js Intel Edison Sphero
            • Examples
        • Sphero Linux API
    • Alom
    • Bacab
      • Getting Started
        • Inventory
        • Accounts
        • Software
      • Proof Of Concepts
        • Doorbell
    • Bitol
      • Drone Software Development Environment
        • PX4
        • JMAVSim
        • Ardupilot
        • SITL Simulator
        • DroneKit
        • QGroundControl
        • MAVLink
        • OpenCV
        • Git Source Code Management
      • Drone Solution Architect
        • Companies
      • Dronecode Project
      • Base Drone Solution
        • Flight Controller Hardware
          • PixHawk
          • IntelĀ® Aero Ready to Fly Drone
          • Emlid
          • Erle Brain
        • Flight Controller Operating System
        • Autopilot
          • Px4
            • Architecture
              • NuttX
              • DriverFramework
            • Shell
          • Ardupilot
          • Software In The Loop
            • jMAVSim
            • DroneKit SITL
        • Communications
          • Mavlink
            • PyMAVLink
        • Ground Control Station
          • QGroundControl
        • Developer APIs
      • Hybrid Drone Solution
      • Autonomous Drone Solution
      • Drone Solutions
        • Erle Robotics
        • Emlid
      • Training
        • Drone Solution Architect
          • Demos
            • Ka’an
            • MĆŗuyal
            • lik’
            • Chak iik’
    • Chaac
    • Bolon Ts'akab
    • Buluc Chabtan
      • Challenge
    • Chaac Uayab Xoc
    • Cacoch
      • Background
        • Open Source
        • Do It Yourself Communities
      • The Project
        • History
        • Career Profile
        • Education Strategy
        • Courses
        • Infrastructure
Powered by GitBook
On this page
  • Lupe Robot
  • Architecture
  • User Input
  • Speech To Text
  • Sync
  • Eclipse Compilation
  • Apps
  • Intel IoT SDK
  • Usability
  • Automation
  • One Time Configuration
  • Pair Intel Edison and Mobile Device
  • Start SPP pro and connect
  • Demo Configuration
  • Configuration
  • Bluetooth Configuration
  • Backup
  • Lupe Robot
  • Architecture
  • User Input
  • Speech To Text
  • Sync
  • Eclipse Compilation
  • Apps
  • Intel IoT SDK
  • Usability
  • Automation
  • One Time Configuration
  • Pair Intel Edison and Mobile Device
  • Start SPP pro and connect
  • Demo Configuration
  • Configuration
  • Bluetooth Configuration
  • Backup
  1. Cities
  2. Hochob
  3. Amikoo

Sandbox

PreviousMain x86NextTbd

Last updated 7 years ago

Lupe Robot

Architecture

  • Speech To Text

  • No debes tardarte mas de dos segundos

Shell Command

User Input

  • Sliders?

hochob@server:~$ sudo pip3 install pyuserinput
The directory '/home/hochob/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/hochob/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyuserinput
  Downloading PyUserInput-0.1.11.tar.gz
Collecting python-xlib (from pyuserinput)
  Downloading python_xlib-0.19-py2.py3-none-any.whl (119kB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 122kB 774kB/s 
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from python-xlib->pyuserinput)
Installing collected packages: python-xlib, pyuserinput
  Running setup.py install for pyuserinput ... done
Successfully installed python-xlib-0.19 pyuserinput-0.1.11
hochob@server:~$

Speech To Text

hochob@server:~$ sudo apt-get install  portaudio19-dev
hochob@server:~$ sudo apt-get install libportaudio2
hochob@server:~$ sudo apt-get install libasound-dev
hochob@server:~$ sudo apt-get install python-dev
hochob@server:~/CodeLabs/ChichenItza/stt$ sudo pip install SpeechRecognition
The directory '/home/hochob/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/hochob/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting SpeechRecognition
  Downloading SpeechRecognition-3.6.3-py2.py3-none-any.whl (31.8MB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 31.8MB 52kB/s 
Installing collected packages: SpeechRecognition
Successfully installed SpeechRecognition-3.6.3
hochob@server:~/CodeLabs/ChichenItza/stt$
hochob@server:~/CodeLabs/ChichenItza/stt$ sudo pip3 uninstall pyttsx
hochob@server:~/CodeLabs/ChichenItza/stt$ git clone https://github.com/westonpace/pyttsx.git
Cloning into 'pyttsx'...
remote: Counting objects: 198, done.
remote: Total 198 (delta 0), reused 0 (delta 0), pack-reused 198
Receiving objects: 100% (198/198), 69.16 KiB | 0 bytes/s, done.
Resolving deltas: 100% (102/102), done.
Checking connectivity... done.
hochob@server:~/CodeLabs/ChichenItza/stt$ cd pyttsx
hochob@server:~/CodeLabs/ChichenItza/stt/pyttsx$ sudo python3 setup.py install

Sync

cvlc --no-video-title-show --start-time 1 --stop-time 5 /home/hochob/Videos/BigBuckBunny.mp4 vlc://pause &
echo "hola mundo" | espeak -ves-la
cvlc vlc://play &
(cvlc --no-video-title-show --start-time 1 --stop-time 5 /home/hochob/Videos/BigBuckBunny.mp4 vlc://pause &) && (sleep 5 && cvlc vlc://play) &
echo "Hola a todos, bienvenidos a Intel" | espeak -v es-la -a 200
cvlc vlc://play &
#!/bin/sh

cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Hola a todos, bienvenidos a Intel" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Como pueden ver, por lo que traigo en el pecho" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Yo funciono con la plataforma Intel Ɖdison, que es una de las tantas cosas que hacemos en Intel" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Espero que les guste el recorrido tanto como a mĆ­" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Por lo pronto, le cederƩ la palabra a mis compaƱeros humanos" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "No, gracias a ti" | espeak -v es-la -a 200
pkill vlc

Development

Eclipse Compilation

Same as Wrist Band

Apps

  • Putty

  • Bluetooth SPP Tools Pro

Intel IoT SDK

pymelab@workstation:~/Descargas/l_iss_iot_p_2016.4.008$ export PATH=$PATH:/home/pymelab/Descargas/jdk1.8.0_121/bin/
pymelab@workstation:~/Descargas/l_iss_iot_p_2016.4.008$ /opt/intel/ISS/iss-iot-launcher

Usability

• Easy Guide (Pending) o Robot

Connection

  1. USB Cable

  2. Mario Robot 192.168.1.102

    • Ssh: root, inteledison

3 modes

  1. Arms, Legs

  2. Predetermined Movements English

  3. Predetermined Movements Spanish

MoveStop to restart Mario Robot

Files 1. MotorsandServos Binary 2. SPP-Loopback.py (Only Testing) 3. btup.sh (Bluetooth Pair Process Always) 4. SPP-pipe-out.py (Used by btup.sh)

OS Version

  1. User Yocto 2.1, 3.5 has an issue with Bluetooth

Sequence

  1. Battery turn on arms (switch located at the right side of the robot)

    • Edison powered on

  2. Turn on Speakers

  3. Turn on Tablet Bluetooth

  4. Run btup.sh under Intel Edison

    • Make btup.sh

  5. Run Bluetooth SPP Pro under Tablet

    • Connect to Edison Bluetooth Device

    • Go to Keyboard Mode

  6. Run MotorsandServos Binary under Intel Edison

  7. Battery turn on legs (Left side of the robot)

  8. Insert Heart

  9. Tablet

Automation

One Time Configuration

Pair Intel Edison and Mobile Device

Poky (Yocto Project Reference Distro) 1.6.1 edison ttyMFD2

edison login: root
Password:
root@edison:~# python SPP-loopback.py &
[1] 327
root@edison:~# rfkill unblock bluetooth
root@edison:~# bluetoothctl
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# agent KeyboardDisplay
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 98:4F:EE:03:78:89 Discovering: yes
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# pair 40:78:6A:26:4A:C2
Attempting to pair with 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Connected: yes
Request confirmation
[agent] Confirm passkey 160981 (yes/no): yes
[CHG] Device 40:78:6A:26:4A:C2 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 40:78:6A:26:4A:C2 UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 40:78:6A:26:4A:C2 Paired: yes
Pairing successful
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 98:4F:EE:03:78:89 Discoverable: yes
[bluetooth]# trust 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Trusted: yes
Changing 40:78:6A:26:4A:C2 trust succeeded
[CHG] Device 40:78:6A:26:4A:C2 RSSI: -55
[bluetooth]# exit

Start SPP pro and connect

root@edison:~# NewConnection(/org/bluez/hci0/dev_40_78_6A_26_4A_C2, 10)
root@edison:~#

Demo Configuration

Configuration

root@edison:~# opkg update
root@edison:~# opkg install git
root@edison:~/CodeLabs/Hochob/LupeRobot# bluetoothctl 
root@edison:~/CodeLabs/Hochob/LupeRobot# cd /lib/systemd/system
root@edison:/lib/systemd/system# vi luperobot.service
[Unit]
Description=Lupe Robot 
After=sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/bin/bash /home/root/CodeLabs/Hochob/LupeRobot/bluetoothlt.sh  
Restart=always
RestartSec=10 

[Install]
Alias=LupeRobot 
WantedBy=multi-user.target
root@edison:/lib/systemd/system# systemctl daemon-reload
root@edison:/lib/systemd/system# systemctl --system enable luperobot
root@edison:/lib/systemd/system# systemctl start luperobot
root@edison:~# sdptool browse F8:CF:C5:D4:CB:BC | grep Channel
    Channel: 2
    Channel: 3
    Channel: 4
    Channel: 19
    Channel: 5
    Channel: 12
root@edison:~#

Bluetooth Configuration

root@edison:~# ./btup.sh 
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device F8:CF:C5:D4:CB:BC Nexus 6
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Development
[bluetooth]# discoverable on
[bluetooth]# quit
[DEL] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device F8:CF:C5:D4:CB:BC Nexus 6
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# connect 40:78:6A:26:4A:C2
Attempting to connect to 40:78:6A:26:4A:C2
[bluetooth]# quit
[DEL] Controller 98:4F:EE:03:78:89 edison [default]
root@edison:~# removing pipe file

making pipe

NewConnection(/org/bluez/hci0/dev_F8_CF_C5_D4_CB_BC, 10)
waiting to open pipe


root@edison:~#
root@edison:~# ./MotorsAndServos 
1
enter recv loop

resetAll
servosStop
moveStop
Asking in 7... 
Asking in 6... 
Asking in 5... 
Asking in 4... 
Asking in 3... 
Asking in 2... 
Asking in 1... 
Go!
resetAll
servosStop
moveStop
Heart connected 
received: 00

Backup

#!/bin/sh
rfkill unblock bluetooth
sleep 2
bluetoothctl << EOF
discoverable on
EOF
sleep 2
bluetoothctl << EOF
connect 40:78:6A:26:4A:C2
EOF
sleep 2

amixer -c 2 cset numid=5 30

python SPP-pipe-out.py &
root@edison:~# amixer -c 2 cset numid=5 30
numid=5,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=37,step=0
  : values=30,30
  | dBminmax-min=-37.00dB,max=0.00dB
root@edison:~#
root@edison:~# bluetoothctl
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# scan on
Discovery started
[CHG] Controller 98:4F:EE:03:78:89 Discovering: yes
[bluetooth]# reboot
Invalid command
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# eit
Invalid command
[bluetooth]#
[DEL] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# connect 40:78:6A:26:4A:C2
Attempting to connect to 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Connected: yes
[CHG] Device 40:78:6A:26:4A:C2 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 40:78:6A:26:4A:C2 UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 40:78:6A:26:4A:C2 Paired: yes
Connection successful
[NEW] Device 08:DF:1F:E6:A2:3E 08-DF-1F-E6-A2-3E
[bluetooth]#
[DEL] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# connect 40:78:6A:26:4A:C2
Attempting to connect to 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Connected: yes
[CHG] Device 40:78:6A:26:4A:C2 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 40:78:6A:26:4A:C2 UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 40:78:6A:26:4A:C2 Paired: yes
Connection successful
[NEW] Device 08:DF:1F:E6:A2:3E 08-DF-1F-E6-A2-3E
[bluetooth]#

Lupe Robot

Architecture

  • Speech To Text

  • No debes tardarte mas de dos segundos

Shell Command

User Input

  • Sliders?

hochob@server:~$ sudo pip3 install pyuserinput
The directory '/home/hochob/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/hochob/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyuserinput
  Downloading PyUserInput-0.1.11.tar.gz
Collecting python-xlib (from pyuserinput)
  Downloading python_xlib-0.19-py2.py3-none-any.whl (119kB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 122kB 774kB/s 
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from python-xlib->pyuserinput)
Installing collected packages: python-xlib, pyuserinput
  Running setup.py install for pyuserinput ... done
Successfully installed python-xlib-0.19 pyuserinput-0.1.11
hochob@server:~$

Speech To Text

hochob@server:~$ sudo apt-get install  portaudio19-dev
hochob@server:~$ sudo apt-get install libportaudio2
hochob@server:~$ sudo apt-get install libasound-dev
hochob@server:~$ sudo apt-get install python-dev
hochob@server:~/CodeLabs/ChichenItza/stt$ sudo pip install SpeechRecognition
The directory '/home/hochob/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/hochob/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting SpeechRecognition
  Downloading SpeechRecognition-3.6.3-py2.py3-none-any.whl (31.8MB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 31.8MB 52kB/s 
Installing collected packages: SpeechRecognition
Successfully installed SpeechRecognition-3.6.3
hochob@server:~/CodeLabs/ChichenItza/stt$
hochob@server:~/CodeLabs/ChichenItza/stt$ sudo pip3 uninstall pyttsx
hochob@server:~/CodeLabs/ChichenItza/stt$ git clone https://github.com/westonpace/pyttsx.git
Cloning into 'pyttsx'...
remote: Counting objects: 198, done.
remote: Total 198 (delta 0), reused 0 (delta 0), pack-reused 198
Receiving objects: 100% (198/198), 69.16 KiB | 0 bytes/s, done.
Resolving deltas: 100% (102/102), done.
Checking connectivity... done.
hochob@server:~/CodeLabs/ChichenItza/stt$ cd pyttsx
hochob@server:~/CodeLabs/ChichenItza/stt/pyttsx$ sudo python3 setup.py install

Sync

cvlc --no-video-title-show --start-time 1 --stop-time 5 /home/hochob/Videos/BigBuckBunny.mp4 vlc://pause &
echo "hola mundo" | espeak -ves-la
cvlc vlc://play &
(cvlc --no-video-title-show --start-time 1 --stop-time 5 /home/hochob/Videos/BigBuckBunny.mp4 vlc://pause &) && (sleep 5 && cvlc vlc://play) &
echo "Hola a todos, bienvenidos a Intel" | espeak -v es-la -a 200
cvlc vlc://play &
#!/bin/sh

cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Hola a todos, bienvenidos a Intel" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Como pueden ver, por lo que traigo en el pecho" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Yo funciono con la plataforma Intel Ɖdison, que es una de las tantas cosas que hacemos en Intel" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Espero que les guste el recorrido tanto como a mĆ­" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "Por lo pronto, le cederƩ la palabra a mis compaƱeros humanos" | espeak -v es-la -a 200
cvlc --no-video-title-show --fullscreen /home/hochob/Selfies/latest.mp4 &
echo "No, gracias a ti" | espeak -v es-la -a 200
pkill vlc

Development

Eclipse Compilation

Same as Wrist Band

Apps

  • Putty

  • Bluetooth SPP Tools Pro

Intel IoT SDK

pymelab@workstation:~/Descargas/l_iss_iot_p_2016.4.008$ export PATH=$PATH:/home/pymelab/Descargas/jdk1.8.0_121/bin/
pymelab@workstation:~/Descargas/l_iss_iot_p_2016.4.008$ /opt/intel/ISS/iss-iot-launcher

Usability

• Easy Guide (Pending) o Robot

Connection

  1. USB Cable

  2. Mario Robot 192.168.1.102

    • Ssh: root, inteledison

3 modes

  1. Arms, Legs

  2. Predetermined Movements English

  3. Predetermined Movements Spanish

MoveStop to restart Mario Robot

Files 1. MotorsandServos Binary 2. SPP-Loopback.py (Only Testing) 3. btup.sh (Bluetooth Pair Process Always) 4. SPP-pipe-out.py (Used by btup.sh)

OS Version

  1. User Yocto 2.1, 3.5 has an issue with Bluetooth

Sequence

  1. Battery turn on arms (switch located at the right side of the robot)

    • Edison powered on

  2. Turn on Speakers

  3. Turn on Tablet Bluetooth

  4. Run btup.sh under Intel Edison

    • Make btup.sh

  5. Run Bluetooth SPP Pro under Tablet

    • Connect to Edison Bluetooth Device

    • Go to Keyboard Mode

  6. Run MotorsandServos Binary under Intel Edison

  7. Battery turn on legs (Left side of the robot)

  8. Insert Heart

  9. Tablet

Automation

One Time Configuration

Pair Intel Edison and Mobile Device

Poky (Yocto Project Reference Distro) 1.6.1 edison ttyMFD2

edison login: root
Password:
root@edison:~# python SPP-loopback.py &
[1] 327
root@edison:~# rfkill unblock bluetooth
root@edison:~# bluetoothctl
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# agent KeyboardDisplay
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 98:4F:EE:03:78:89 Discovering: yes
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# pair 40:78:6A:26:4A:C2
Attempting to pair with 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Connected: yes
Request confirmation
[agent] Confirm passkey 160981 (yes/no): yes
[CHG] Device 40:78:6A:26:4A:C2 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 40:78:6A:26:4A:C2 UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 40:78:6A:26:4A:C2 Paired: yes
Pairing successful
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 98:4F:EE:03:78:89 Discoverable: yes
[bluetooth]# trust 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Trusted: yes
Changing 40:78:6A:26:4A:C2 trust succeeded
[CHG] Device 40:78:6A:26:4A:C2 RSSI: -55
[bluetooth]# exit

Start SPP pro and connect

root@edison:~# NewConnection(/org/bluez/hci0/dev_40_78_6A_26_4A_C2, 10)
root@edison:~#

Demo Configuration

Configuration

root@edison:~# opkg update
root@edison:~# opkg install git
root@edison:~/CodeLabs/Hochob/LupeRobot# bluetoothctl 
root@edison:~/CodeLabs/Hochob/LupeRobot# cd /lib/systemd/system
root@edison:/lib/systemd/system# vi luperobot.service
[Unit]
Description=Lupe Robot 
After=sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/bin/bash /home/root/CodeLabs/Hochob/LupeRobot/bluetoothlt.sh  
Restart=always
RestartSec=10 

[Install]
Alias=LupeRobot 
WantedBy=multi-user.target
root@edison:/lib/systemd/system# systemctl daemon-reload
root@edison:/lib/systemd/system# systemctl --system enable luperobot
root@edison:/lib/systemd/system# systemctl start luperobot
root@edison:~# sdptool browse F8:CF:C5:D4:CB:BC | grep Channel
    Channel: 2
    Channel: 3
    Channel: 4
    Channel: 19
    Channel: 5
    Channel: 12
root@edison:~#

Bluetooth Configuration

root@edison:~# ./btup.sh 
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device F8:CF:C5:D4:CB:BC Nexus 6
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# discoverable on
[bluetooth]# quit
[DEL] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device F8:CF:C5:D4:CB:BC Nexus 6
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# connect 40:78:6A:26:4A:C2
Attempting to connect to 40:78:6A:26:4A:C2
[bluetooth]# quit
[DEL] Controller 98:4F:EE:03:78:89 edison [default]
root@edison:~# removing pipe file

making pipe

NewConnection(/org/bluez/hci0/dev_F8_CF_C5_D4_CB_BC, 10)
waiting to open pipe


root@edison:~#
root@edison:~# ./MotorsAndServos 
1
enter recv loop

resetAll
servosStop
moveStop
Asking in 7... 
Asking in 6... 
Asking in 5... 
Asking in 4... 
Asking in 3... 
Asking in 2... 
Asking in 1... 
Go!
resetAll
servosStop
moveStop
Heart connected 
received: 00

Backup

#!/bin/sh
rfkill unblock bluetooth
sleep 2
bluetoothctl << EOF
discoverable on
EOF
sleep 2
bluetoothctl << EOF
connect 40:78:6A:26:4A:C2
EOF
sleep 2

amixer -c 2 cset numid=5 30

python SPP-pipe-out.py &
root@edison:~# amixer -c 2 cset numid=5 30
numid=5,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=37,step=0
  : values=30,30
  | dBminmax-min=-37.00dB,max=0.00dB
root@edison:~#
root@edison:~# bluetoothctl
[NEW] Controller 98:4F:EE:03:78:89 edison [default]
[NEW] Device 00:16:D4:FA:F6:20 Project Tango Tablet Developmen
[bluetooth]# scan on
Discovery started
[CHG] Controller 98:4F:EE:03:78:89 Discovering: yes
[bluetooth]# reboot
Invalid command
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# eit
Invalid command
[bluetooth]#
[DEL] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# connect 40:78:6A:26:4A:C2
Attempting to connect to 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Connected: yes
[CHG] Device 40:78:6A:26:4A:C2 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 40:78:6A:26:4A:C2 UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 40:78:6A:26:4A:C2 Paired: yes
Connection successful
[NEW] Device 08:DF:1F:E6:A2:3E 08-DF-1F-E6-A2-3E
[bluetooth]#
[DEL] Device 40:78:6A:26:4A:C2 XT1008
[NEW] Device 40:78:6A:26:4A:C2 XT1008
[bluetooth]# connect 40:78:6A:26:4A:C2
Attempting to connect to 40:78:6A:26:4A:C2
[CHG] Device 40:78:6A:26:4A:C2 Connected: yes
[CHG] Device 40:78:6A:26:4A:C2 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 40:78:6A:26:4A:C2 UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 40:78:6A:26:4A:C2 Paired: yes
Connection successful
[NEW] Device 08:DF:1F:E6:A2:3E 08-DF-1F-E6-A2-3E
[bluetooth]#

https://community.home-assistant.io/t/passing-dynamic-info-to-shell-command/4212/2
https://community.home-assistant.io/t/pass-value-to-command-line/587
https://hub.docker.com/r/balloob/home-assistant/builds/bacthg3u3vo63yzw8jotjna/
https://libraries.io/github/augmify/home-assistant
https://github.com/PyUserInput/PyUserInput#dependencies
https://home-assistant.io/components/keyboard/
https://github.com/PyUserInput/PyUserInput#dependencies
http://stackoverflow.com/questions/29615235/pyttsx-no-module-named-engine
https://ubuntuforums.org/showthread.php?t=1371622
https://www.gitbook.com/book/maquirog/rob/details
https://github.com/maquirog/MotorsAndServos
Installing the IntelĀ® System Studio IoT Edition on Linux*
https://home-assistant.io/components/switch.command_line/
https://www.youtube.com/watch?v=kaoLIE-LnRs
https://home-assistant.io/components/alexa/
https://community.home-assistant.io/t/passing-dynamic-info-to-shell-command/4212/2
https://community.home-assistant.io/t/pass-value-to-command-line/587
https://hub.docker.com/r/balloob/home-assistant/builds/bacthg3u3vo63yzw8jotjna/
https://libraries.io/github/augmify/home-assistant
https://github.com/PyUserInput/PyUserInput#dependencies
https://home-assistant.io/components/keyboard/
https://github.com/PyUserInput/PyUserInput#dependencies
http://stackoverflow.com/questions/29615235/pyttsx-no-module-named-engine
https://ubuntuforums.org/showthread.php?t=1371622
https://www.gitbook.com/book/maquirog/rob/details
https://github.com/maquirog/MotorsAndServos
Installing the IntelĀ® System Studio IoT Edition on Linux*
https://home-assistant.io/components/switch.command_line/
https://www.youtube.com/watch?v=kaoLIE-LnRs
https://home-assistant.io/components/alexa/