[duxuser] Making Duxbury produce 8 dot braille for programming example

  • From: "Robert Jaquiss" <rjaquiss@xxxxxxxxxxxxx>
  • To: <duxuser@xxxxxxxxxxxxx>
  • Date: Wed, 30 May 2007 13:25:12 -0500

Hello:

     I need to print out a C program as an example. I want my output to have 
characters like those on a braille display. Ideally, I would like Duxbury to 
switch my embosser to eight-dot braille and emboss the lines as they appear 
without reformatting them. Of course, I want Duxbury to reset the embosser back 
to six dot braille when I am done. A small sample of what I want to print is 
appended to this note. Thank you for any help.

Regards,

Robert Jaquiss
230 Peach Tree Drive
West Monroe, Louisiana 71291-8653
Phone: (318) 396-1853
Email: rjaquiss@xxxxxxxxxxxxx

----------- Sample code --------

//******************************************************************************//
//                              While Loop                                      
//
//                              RobotC on NXT                                   
//
//                                                                              
//
//  This program allows your taskbot to run in a square five times.             
//
//                                                                              
//
//******************************************************************************//
//    Focus                                           //
//                                                                              
//
//  This program allows your robot to move in a sqaure by repeating a forward   
//
//  and right turn movement. It will repeat this movement 20 times so your      
//
//  robot does five squares. It tracks the number of times its completed the    
//
//  movement with the variable "i".  "i" starts at zero and each time the loop  
//
//  is competed 1 is added to "i"'s value.  So after one forward and right turn 
//
//  movement, "i" is equal to 1. After 6 movements "i" is equal to 6 and after  
//
//  20 movements "i" is equal to 20. The repetition of the movement is          
//
//  controlled by the loop command which ends itself when "i" equals 20.        
//
//                                                                              
//
//******************************************************************************//
//    Notes                                           //
//                                                    //
//  1. The wait times used may need to be customized depending on robot         
//
//     configuration. Test your robot several times to find the best wait time  
//
//     to get a 90 degree turn.  Once you have the proper timing, substitute it 
//
//     for the "wait1Msec(750)" command in the following program.               
//
//  2. The robot will end facing the same direction as when it started.         
//
//                                                                              
//
//******************************************************************************//
//    Motors & Sensors                                //
//                                                                              
//
//  [I/O Port]          [Name]          [Type]          [Description]           
//
//  Port A              none            Motor           Right Motor             
//
//  Port B              none            Motor           Left Motor              
//
//                                                                              
//
//******************************************************************************//


task main()
{
   int i = 0;                   //the variable "i" is declared as an integer, 
and initialized to equal zero

      while(i < 20)             //a while loop is delcared with the variable 
"i" being less than 20 as its true condition
      {
         motor[motorA] = 75;    //motor A is run at a 75 power level
  motor[motorB] = 75;    //motor B is run at a 75 power level
  wait1Msec(4000);       //the program waits 4000 milliseconds before running 
further code

         motor[motorA] = 75;    //motor A is run at a 75 power level
  motor[motorB] = -75;   //motor B is run at a -75 power level
  wait1Msec(750);        //the program waits 750 milliseconds before running 
further code

         i++;                   //the variable "i" is incremented (increased) 
by 1
       }
}

Other related posts: