mirror of
				https://github.com/digistump/DigistumpArduino.git
				synced 2025-11-03 13:04:48 -08:00 
			
		
		
		
	Add OLED library - update tiny wire libraries - add support for all PWM channels and PWM on pin 8
This commit is contained in:
		@@ -52,6 +52,8 @@
 | 
			
		||||
#define RX_AUX_GEAR_PIN   0 //Choose here the pin for the RC signal
 | 
			
		||||
#define DEBUG_TX_RX_PIN   1 //Adjust here your Tx/Rx debug pin (Do NOT work on Digispark PIN 5: choose another PIN)
 | 
			
		||||
 | 
			
		||||
#define SERIAL_BAUD_RATE  57600 //Adjust rate here
 | 
			
		||||
 | 
			
		||||
SoftRcPulseIn RxAuxGear;    //Choose a name for your RC channel signal
 | 
			
		||||
 | 
			
		||||
SoftSerial    MyDbgSerial(DEBUG_TX_RX_PIN, DEBUG_TX_RX_PIN, true); //true allows to connect to a regular RS232 without RS232 line driver 
 | 
			
		||||
@@ -60,7 +62,7 @@ void setup()
 | 
			
		||||
{
 | 
			
		||||
  RxAuxGear.attach(RX_AUX_GEAR_PIN);
 | 
			
		||||
  
 | 
			
		||||
  MyDbgSerial.begin(38400); //Do NOT forget to setup your terminal at 38400 (eg: arduino IDE serial monitor)
 | 
			
		||||
  MyDbgSerial.begin(SERIAL_BAUD_RATE); //Do NOT forget to setup your terminal at same baud rate (eg: arduino IDE serial monitor)
 | 
			
		||||
  MyDbgSerial.txMode();     //Before sending a message, switch to txMode
 | 
			
		||||
  MyDbgSerial.print(F("SoftRcPulseIn lib V"));MyDbgSerial.print(SoftRcPulseIn::LibTextVersionRevision());MyDbgSerial.println(F(" demo"));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@ boolean  LedState=HIGH;
 | 
			
		||||
 | 
			
		||||
void setup()
 | 
			
		||||
{
 | 
			
		||||
#if !defined(__AVR_ATtiny24__) && !defined(__AVR_ATtiny44__) && !defined(__AVR_ATtiny84__) && !defined(__AVR_ATtiny25__) && !defined(__AVR_ATtiny45__) && !defined(__AVR_ATtiny85__)
 | 
			
		||||
#if !defined(__AVR_ATtiny24__) && !defined(__AVR_ATtiny44__) && !defined(__AVR_ATtiny84__) && !defined(__AVR_ATtiny25__) && !defined(__AVR_ATtiny45__) && !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny167__)
 | 
			
		||||
  Serial.begin(9600);
 | 
			
		||||
  Serial.print("SoftRcPulseIn library V");Serial.print(SoftRcPulseIn::LibTextVersionRevision());Serial.print(" demo"); /* For arduino UNO which has an hardware UART, display the library version in the console */
 | 
			
		||||
#endif
 | 
			
		||||
@@ -74,8 +74,8 @@ static uint16_t Width_us=NEUTRAL_US; /* Static to keep the value at the next loo
 | 
			
		||||
    ServoMotor[INVERTED].write_us((NEUTRAL_US*2)-Width_us); /* Inverted Signal */
 | 
			
		||||
    SoftRcPulseOut::refresh(NOW); /* NOW argument (=1) allows to synchronize outgoing pulses with incoming pulses */
 | 
			
		||||
    RxPulseStartMs=millis();      /* Restart the Chrono for Pulse */
 | 
			
		||||
#if !defined(__AVR_ATtiny24__) && !defined(__AVR_ATtiny44__) && !defined(__AVR_ATtiny84__) && !defined(__AVR_ATtiny25__) && !defined(__AVR_ATtiny45__) && !defined(__AVR_ATtiny85__)
 | 
			
		||||
    Serial.print("Pulse=");Serial.println(Largeur_us); /* For arduino UNO which has an hardware UART, display the library version in the console */
 | 
			
		||||
#if !defined(__AVR_ATtiny24__) && !defined(__AVR_ATtiny44__) && !defined(__AVR_ATtiny84__) && !defined(__AVR_ATtiny25__) && !defined(__AVR_ATtiny45__) && !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny167__)
 | 
			
		||||
    Serial.print("Pulse=");Serial.println(Width_us); /* For arduino UNO which has an hardware UART, display the library version in the console */
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user