Changeset 8a0fa760 in orbit


Ignore:
Timestamp:
11/15/12 18:29:11 (8 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
Children:
60b4520
Parents:
321bdc1 (diff), abd9133 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of ssh://puzzlebox.info/repo/orbit

Files:
10 added
1 edited

Legend:

Unmodified
Added
Removed
  • arduino/puzzlebox_orbit_Uno_V3/puzzlebox_orbit_Uno_V3.ino

    r8e852bb race9e89  
    108108 
    109109void setThrottle() { 
    110    
     110  
    111111  char inByte=0; 
    112112  int a=0; 
     
    114114  int c=0; 
    115115  int newThrottle=0; 
    116    
     116  
    117117  while (Serial.available() == 0); 
    118118  inByte = Serial.read() - '0'; 
    119119  //Serial.println(inByte); 
    120120  a = inByte; 
    121    
     121  
    122122  while (Serial.available() == 0); 
    123123  inByte = Serial.read() - '0'; 
    124124  //Serial.println(inByte); 
    125125  b = inByte; 
    126    
     126  
    127127  while (Serial.available() == 0); 
    128128  inByte = Serial.read() - '0'; 
    129129  //Serial.println(inByte); 
    130130  c = inByte; 
    131    
     131  
    132132  newThrottle = (a * 100) + (b * 10) + c; 
    133    
     133  
    134134  if (newThrottle < 0) 
    135135    newThrottle=0; 
    136    
     136  
    137137  if (newThrottle > 100) 
    138138    newThrottle=100; 
    139      
     139    
    140140  _throttle=newThrottle; 
    141    
     141  
    142142  Serial.print("_throttle="); 
    143143  Serial.println(int(_throttle)); 
    144    
     144  
    145145} 
    146146 
     
    163163      case '2':  _channel='B';  Serial.println("_channel=B"); break; 
    164164      case '3':  _channel='C';  Serial.println("_channel=C"); break; 
    165       case '1':  _channel='A';  Serial.print("_channel=A"); break; 
    166       case '2':  _channel='B';  Serial.print("_throttle=B"); break; 
    167       case '3':  _channel='C';  Serial.print("_throttle=C"); break; 
    168165      case 'x':  setThrottle(); break; 
    169166    } 
Note: See TracChangeset for help on using the changeset viewer.