Changeset 7b573dd in orbit


Ignore:
Timestamp:
02/07/16 03:03:29 (4 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master
Children:
a8f3d74
Parents:
206a8e1
Message:
  • added support for external triggering of flight
File:
1 edited

Legend:

Unmodified
Added
Removed
  • arduino/puzzlebox_orbit_Uno_V3/puzzlebox_orbit_Uno_V3.ino

    ra9059a5 r7b573dd  
    1414 
    1515// use pin 11 on the Mega instead, otherwise there is a frequency cap at 31 Hz 
    16 int IR = 10;  // the pin that the Infrared LED is attached to 
     16// int IR = 10;  // the pin that the Infrared LED is attached to 
     17int IR = 11;  // the pin that the Infrared LED is attached to 
    1718int ON = 128; // 17.5us/26us = 172.3/256 
    1819int OFF = 0; 
     
    235236void loop() 
    236237{ 
     238         
     239        uint8_t flightActive = map(analogRead(A0), 0, 1023, 0, 100); 
     240        Serial.print("flightActive [A0]: "); 
     241        Serial.println(flightActive, DEC); 
     242         
     243        if (flightActive > 85) 
     244                _throttle=85; 
     245        else 
     246                _throttle=0; 
     247         
    237248        int i; 
    238249        if (Serial.available() > 0)  
Note: See TracChangeset for help on using the changeset viewer.