CSC 499 Grinnell College Fall, 2013  
Scribbler 2 Bluetooth
Communication
with C
Scribbler 2
 
 

Current Timeline — Tentative Schedule of Activities

Week index: 1234567891011121314spring

Although the project will evolve over the semester, the following schedule outlines a possible time line for this project.

Color code:

Week Dates Activities Status Product(s)
Week 1: 29 August– 4 September Reading concerning Bluetooth Communications On-line text book read
Review low-level and file-stream approaches for Bluetooth communications
  • Experimentation with low-level programs, modified from code by Hugan and Rudolph
    • simplescan.c, scan for available Bluetooth devices
    • rfcomm-client.c, send 9-byte message to Scribbler 2 to beep
  • Experimentation with open system call
    • rfcomm-led.c , toggle LED; original program by Keith O'Hara, modified by Henry Walker
    • rfcomm-serial-open.c , use open with 9-byte message to beep
  • Use of file open (fopen) with 9-byte string arrays; code by Henry Walker
    • rfcomm-serial-fopen.c , send 2 beep commands
    • rfcomm-serial-getname.c , set robot name
    • fcomm-serial-setname.c , retrieve robot name
Mechanics of Bluetooth Communication reviewed
Explore available packages for text-to-speech synthesis on Workstation in C (callable from C programs) Experiments with eSpeak program, written in C++ Available from http://espeak.sourceforge.net/
Week 2: 5–11 September Review sample C programs to communicate with Scribbler 2 robot at low level and file-stream level Edits made to sample program; other programs fine
Plan poster on basic Bluetooth communication Poster framework outlined
Overview of content discussed
Draft 1 prepared and reviewed
Determine reliable approach for text-to-speech synthesis on Workstation in C (callable from C programs) Exploration underway http://espeak.sourceforge.net/ downloaded and run on a Macintosh
Week 3: 12–18 September Write draft poster on basic Bluetooth communication Draft (version 2.7) completed Draft (version 2.7) reviewed
Create svn repository for code development MyroC repository established svn repository MyroC created
Install http://espeak.sourceforge.net/ on Linux; run in both stand-alone mode within context of a callable procedure Code installed by Dr. Stone Code available on all MathLAN workstations
  • espeak program in /usr/bin
  • static libraries installed at /usr/lib/x86_64-linux-gnu/libespeak.a
  • dynamic libraries installed at /usr/lib/x86_64-linux-gnu/libespeak.so.1.1.46
  • header file installed at /usr/include/espeak/speak_lib.h
Experiment with eSpeak program and procedures Basic code developed
  • eSpeak program run as delivered
  • Program for simple speech developed, based on eSpeak library functions
simple-speech.c program developed to use eSpeak library (help obtained from eSpeak author Jonathan Duddington
Develop test program for sending and receiving commands to multiple robots Program available multipleRobot.c
Week 4: 19–25 September Write/polish poster on basic Bluetooth communication Draft (version 2.9) refined poster (version 2.9) completed
Develop rConnect, rDisconnect, and byte-level procedures for sending and receiving commands Completed for socket communication Basic version of MyroC.h and Myro.c checked into svn
Write procedure(s) headers and implementation for text-to-speech synthesis on Workstation in C (callable from C programs) Requires installation, sample runs Package implemented and tested
  • eSpeakPackage.h provides definitions for functions eSpeakConnect(), eSpeakDisconnect(), eSpeakTalk( string )
  • eSpeakPackage.c implements calls to eSpeak functions
  • eSpeakTest.c tests the eSpeakPackage code
  • startPulseAudio starts pulseaudio channel, as required by espeak
  • stopPulseAudio closes the pulseaudion channel
  • textlines-to-speech.c started by eSpeakConnect, starts program utilizing espeak functions to read successive lines and convert them to speech as received
  • Makefile allows systematic compilation of the eSpeak package
Week 5: 26 September– 2 October Write/polish poster on basic Bluetooth communication Final version forthcoming Final version in process
Add basic capabilities to MyroC.h and MyroC.c Socket communcation implemented Undated MyroC.h and MyroC.c checked into svn, with these capabilities:
  • rConnect (MyroC.h and MyroC.c)
  • rDisconnect (MyroC.h and MyroC.c)
  • rSend (MyroC.c only)
  • rReceive< (MyroC.c only)/font>
  • rBeep (MyroC.h and MyroC.c)
Refine espeak capabilities Basic testing completed
  • Speech adjustments made
    • spacing between words expanded
    • by default, speaker is radonably male or female
    • speaker may be set to either male or female with
  • Technical adjustments
    • eSpeakSetGender function added to eSpeakPackage.h
    • user is checked, so remote users not allowed to generate speech on local workstation
    • actions of user synchronized with speech synthesis
    • scripts checked into svn and libraries updated
eSpeak tested and prepared for CSC 161 context Examples, documentation completed Desired Products
Week 6: 3–9 October Develop general commands Completed Specifications added to MyroC header file checked into svn
Desired capabilities:
  • rConnect
  • rDisconnect
  • rSetConnection
  • rBeep
  • rBeep2
  • rSetName
  • rGetName
  • rSetForwardness
  • rGetForwardness
  • rSetLEDFront
  • rSetLEDBack
  • rGetBattery
Document byte code for general commands Completed Add byte code details for general commands to Scribbler Byte-Code Commands Web page
Implement general commands Checked into svn Implementation added to MyroC.c
Develop extensive test suite for general commands Completed general-test.c available
Weeks 7-8: 10–18 October Develop commands for robot movement Completed Specifications added to MyroC header file
Desired capabilities:
  • rTurnLeft
  • rTurnRight
  • TurnSpeed
  • rForward
  • rBackward
  • rMotors
  • rStop
  • rHardStop
Document byte code for movement commands Completed Add byte code details for movement commands to Scribbler Byte-Code Commands Web page
Implement movement commands Checked into svn Implementation added to MyroC.c
Develop extensive test suite for movement commands Completed movement-test.c available
Fall Break
Weeks 9-10: 28 October– 15 November Design sensor commands Completed Specifications added to MyroC header file
Desired capabilities:
  • rGetLightsAll
  • rGetLightTxt
  • rGetStall
  • rGetObstacleAll
  • rGetObstacleTxt
  • rGetLine
  • rGetBrightAll
  • rSetBrightTxt
  • rSetIRPower
  • rGetIRAll
  • rSetIRTxt
Document byte code for sensor commands Underway Add byte code details for sensor commands to Scribbler Byte-Code Commands Web page
Implement sensor commands Checked into svn Add implementation to MyroC.c
Develop extensive test suite for sensor commands Completed Test suites developed and checked into svn
Weeks 11-12: 16  November– 1 December Investigate Linux libraries for images Basic search conducted Identified libjpeg packagesfor Linux
Identify procedure headers for pictures Preliminary draft determined Draft procedure signatures identified:
  • Picture * rTakePicture()
  • success/failure (0/1) rSavePicture (filename, Picture )
  • Picture * rLoadPicture (filename)
  • rShowPicture (Picture, NULL (blocking) or name of frame (non-blocking)
  • rCreateBlankPicture (height, width, Pixel (default color)
  • rJPEGPictureTo2DStruct(Picture *, structure pict *
  • e2DStructToJPEGPicture (structure pict *, Picture *)
  • rPictureGetPixel (Picture *, row, col)
  • rPictureSetPixel (Picture *, row, col, Pixel)
  • rPictureJPEGTo1DArray (Picture *, array[][])
  • rPicutre1DArrayToJPEG (array[][], Picture *
  • int rgetPictureHeight (Picture *)
  • int rgetPictureWidth (Picture *)
  • Picture * rClonePicture (Picture *)
Weeks 13-14: 2–8 December Review byte command table Completed scribbler-commands.shtml
Conduct integration testing of all code for general commands, movement commands, and sensor commands Completed All tests passed
Paper written and refined for next development team Completed Full paper available for next team
Spring 2013 January / February Communicate with Myro team regarding byte command table Correspondence required Possible distribution within roboteducation.org
Presentation to a Thursday Extra Scheduled April 15, 2014 Notes available

This time line will be updated regularly throughout the project.

created 24 April 2013
last revised 6 April 2014
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.