Extra inputs for Devo Tx's

More
14 Nov 2015 02:59 #40035 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
Deal57 (or anyone else) could you please post an .ini model file where you use some of the add on switches as a 3-position switch so I can see how to setup the mixer? I've added two 3-way's to my 7E and set them up in the mixer like I thought and I cant get it going. They're going into D6 7 8 and 9 and from watching the serial monitor they're working so I buttoned it back up figuring everything was G2G but I cant for the life of me get the mixer right to do, well, anything...

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/

Please Log in or Create an account to join the conversation.

More
14 Nov 2015 05:01 #40039 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's
Do you see the switches in the channel monitor? They should show up as PPM# in the input screen. If that's showing up you can use them just like any other switch. I'll post an ini in the morning.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

More
14 Nov 2015 14:09 #40044 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's
Here is an example of a model.ini for an OrangeRX R1020X I used briefly during some tests with my quad. This is fully working, but I only used it in bench testing because my range tests were disappointing. Since this is a quad I pass all of the sticks and pots to the Flight Controller, so I think this is a pretty comprehensive example. Photos on are my Googledrive .

File Attachment:

File Name: model21-Ex...anel.ini
File Size:4 KB


My Arduino-based extra switch box is externally mounted, runs on a single 9v battery and connects to the DSC (trainer) port. I posted the sketch here some time ago. This is set up to provide two potentiometers (PPM1 and PPM2) assigned to my gimbal on channels 6 and 7, one 6-position Flight Mode switch panel (PPM7) assigned to channel 5, and 2-way switches on PPM4, PPM5 and PPM6 assigned to channels 8, 9 and 10. I set aside PPM3 for a 6-way rotary switch but did not use it.

Please let me know if you have any questions.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!
Attachments:

Please Log in or Create an account to join the conversation.

More
14 Nov 2015 14:14 #40045 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
Hi, thanks for the reply.

I'm away from my computer right now but I did take a look at the file on my phone, just curious why the deltaPW is set to 470?

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/

Please Log in or Create an account to join the conversation.

More
14 Nov 2015 14:18 #40046 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's
That was just a tweak of the PPM stream to get the switches to go -100 to 100 without setting channel ranges. I'm pretty sure this will vary slightly with every board, so it is nice to have it in one place rather than tweaking every channel.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

  • Rolf
  • Rolf's Avatar
  • Offline
  • Devo 6s, Jumper T8SG v2+ carbon
More
14 Nov 2015 16:34 - 15 Nov 2015 11:03 #40052 by Rolf
Replied by Rolf on topic Extra inputs for Devo Tx's
Hey,
my Devo 7e lacks an 'oh shit'-button, as Cerial_Killer mentioned in this thread. If I understand the discussion correct, a hardware-button or -switch, put into the trainer-hole, could be used in the deviation-software initiating the rescue-action.
I would like to buy such a switch/button, because I don't like opening and melting my tx.
Where can I buy it and how can I use it in deviation-software?

Walkera Devo 6s, 7e and 10, Jumper T8SG v2+ lcd, Brain 2, Spektrum satellites and SPM4649T
Last edit: 15 Nov 2015 11:03 by Rolf.

Please Log in or Create an account to join the conversation.

More
14 Nov 2015 22:35 #40060 by mwm
Replied by mwm on topic Extra inputs for Devo Tx's

Rolf wrote: Hey,
my Devo 7e lacks an 'oh chit'-button, as Cerial_Killer mentioned in this thread. If I understand the discussion correct, a hardware-button or -switch, put into the trailer-hole, could be used in the deviation-software initiating the rescue-action.
I would like to buy such a switch/button, because I don't like opening and melting my tx.
Where can I buy it and how can I use it in deviation-software?


I haven't searched the thread for this because these forums don't have a thread search function, but if you just want another button/switch, have you considered using one of the Left/Right/Up/Down or throttle trim buttons, or are you using them all?

Alternatively, if you want someone to do the 3x2 mod, check out Jon Barter's thread on rcgroups: www.rcgroups.com/forums/showthread.php?t=2364228

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
15 Nov 2015 13:52 #40077 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
All you need to do for a "oh crap" button is setup a button to send whatever value your angle mode switch sends on it's channel. For example if your flight mode is controlled on channel 6 by SW A and angle mode is position 0 ( value of -100) then set a mixer up to use a trim button(or an add-on button if you'd like, but not needed) to send that -100 value on Ch6 whenever it's pressed. That way if you're in rate mode (SW A is NOT in position 0) and you loose orientation you just have to hit that button for a sec while it self-levels it's self then it goes right back to rate mode once you release it.

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/

Please Log in or Create an account to join the conversation.

  • Rolf
  • Rolf's Avatar
  • Offline
  • Devo 6s, Jumper T8SG v2+ carbon
More
28 Nov 2015 22:10 #40471 by Rolf
Replied by Rolf on topic Extra inputs for Devo Tx's
Hey,
I did as mwm and cereal_killer told: It works for me as proposed. Never noticed this dev-feature.
I even realized a combination of 2 switches for vstabi bank-switching between 4 banks.
Thanks a lot.

Walkera Devo 6s, 7e and 10, Jumper T8SG v2+ lcd, Brain 2, Spektrum satellites and SPM4649T

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 15:52 - 07 Dec 2015 17:18 #40657 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
Deal57,
I have STILL not got this working. I've followed your wiring exactly, I've got the two POT's working (or I should say, using your code they still work, cause they've always worked) but I can not get my two 3-was switches to work.

I've got them wired to D2 3 4 and 5, I've got the middle legs wired to GND (do I need to be using diodes like on the devo built-in switch mod?) but it just doesnt work. PPM3 moves with switch 1 between 103 and 0 and PPM4 moves with switch1 (THE SAME SWITCH) between 0 and -103.

Even since I first got the POT's working I've been trying to figure this out. Can you please help me...


Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/
Last edit: 07 Dec 2015 17:18 by Cereal_Killer.

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 15:57 #40658 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
I now have my Nano V3, my 2x 5k pots and the caps for them ordered, and I think this is probably going to be the best $3 invested ever!! No plans for switches yet, my main goal is for full proportional flaps options, and will be great for moving spoilers to the throttle stick and having throttle on a pot on motorgliders!!

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 16:11 #40659 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
Actually, here's a question...

"Real estate" inside the 7E is pretty scarce, and as such, the smaller the controller the better. If the goal for a certain person is JUST a couple of pots, no switches, or maybe a single switch, like just a minimum... would a Digispark be configurable for it? I was just asking because I have a Nano on its way, but I also have a Digispark with no home in a drawer somewhere, and that's nice and small...

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 17:33 #40663 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's

Cereal_Killer wrote: Deal57,
I have STILL not got this working. I've followed your wiring exactly, I've got the two POT's working (or I should say, using your code they still work, cause they've always worked) but I can not get my two 3-was switches to work.

I've got them wired to D2 3 4 and 5, I've got the middle legs wired to GND (do I need to be using diodes like on the devo built-in switch mod?) but it just doesnt work. PPM3 moves with switch 1 between 103 and 0 and PPM4 moves with switch1 (THE SAME SWITCH) between 0 and -103.

Even since I first got the POT's working I've been trying to figure this out. Can you please help me...


Given the values you mention, I'm guessing you're using sw1_uS AND sw2_uS for the first 3-way. You do not need diodes.

So for the first 3-way, the code should be:
if (digitalRead(swPin_D1) != 1) { // 3-way Switch 1
           sw1_uS = pulseMin;
  } else {
           if (digitalRead(swPin_D2) != 1 ) {
            sw1_uS = pulseMax;
  }        else {
            sw1_uS = pulseMid;
            }
  }

The poles of the switch are each checked to see if the are NOT high (grounded means the switch is on); only one of the poles on a 3-way switch can be grounded at any given time. In the example, one pole of the 3-way is connected to digital pin 2, and one pole to digital pin 3 (for portability I use variables swPin_D1 and swPin_D2). The pulse value (pulseMin, pulseMax, pulseMid) is assigned to the sw1_uS variable (first 3-way), which is in turn used in the output stream for channel 3. A similar section of code would go to sw2_uS on channel 4 for the other 3-way switch.

If this doesn't take care of it, PM me your code.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 17:50 #40664 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's

Epitaph wrote: Actually, here's a question...

"Real estate" inside the 7E is pretty scarce, and as such, the smaller the controller the better. If the goal for a certain person is JUST a couple of pots, no switches, or maybe a single switch, like just a minimum... would a Digispark be configurable for it? I was just asking because I have a Nano on its way, but I also have a Digispark with no home in a drawer somewhere, and that's nice and small...


Now that's a thought! It has four analog pins, use two for the pots. Then you need one pin for the PWM output. With the remaining three pins you can put one 3-way and one 2-way, or maybe three 2-ways. It's not much cheaper than a nano, but the space saved is awesome. Gotta get me one of those to try!

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 19:15 #40666 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
If you want to try it out, great... me at the moment, I'm having problems with the Digispark getting it to work. I decided to dig for it and found it in a drawer, and I can't seem to get any type of sketch to load into it, just keep getting a constant error with library loads. I'll try it on my Windows XP computer, as this was done on my 7, and if no joy, I'll just forget about the Digispark and go straight with the Nano that's on its way.

I originally got it for an LED project on a small plane, but that project got put aside, so it's no great loss if the digispark goes back in the drawer...

But if you can get it going, Deal57, I think it might be an interesting option purely because it's so small, and can even be made smaller once you have it programmed by cutting the USB part off once you don't need it!!

Please Log in or Create an account to join the conversation.

More
07 Dec 2015 21:01 #40670 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
OK, I have the Digispark finally working (at least with the blink sketch tested with different blink times), now I just have to figure out the pin numbering to adapt the code you've written up and wait for the pots to arrive!!

Please Log in or Create an account to join the conversation.

More
08 Dec 2015 04:45 - 08 Dec 2015 06:51 #40676 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
To clarify my wiring. I have the first 3-way switch wired in to D6 and D7 and the second 3-way wired into D8 and D9.

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/
Last edit: 08 Dec 2015 06:51 by Cereal_Killer.

Please Log in or Create an account to join the conversation.

More
08 Dec 2015 06:48 - 08 Dec 2015 07:26 #40677 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
Hi again Deal, my code it to long to PM you...

As of now switch D1 operates as a 2 way moving Ch PPM3 between -108 and 0 (switched from low to mid, switching it up does nothing),The second 3-way does the same thing. This is your code from page 4 with the stuff I dont use removed and the snipit you posted above added in at the end (original DigitalRead lines removed)
// PPM Encoder Analog Add-ons for Devo7e
// For use with Arduino Pro Mini 328P
// J. Diehl 04/08/2015
// Based on a sketch by Ian Johnston 29/04/2010
//  modified by Epyon and Cereal_Killer
// Version 2.0 
// Low cost way to add extra POT's to any radio that accepts PPM input for <$15
//  using an arduino nano and a few POT's, visit DeviationTX.com for info. 
// POT's on A1 and A2, optional Thumbwheel on A3, optional switches on D6-D10
// PPM output on D13
//  PPM inout to tip of 3.5 stereo, this is the black wire on your Devo 7E
//  Ring Shunt on D11 when shorted indicate DSC port in use (e.g. Plug inserted)
//  this will stop monitoring the inputs and outputs until these are no longer shorted
//
//  Original Sketch uses:
//  A1-3 Analog in for Pots 1, 2 and 3
//  D6-10 Digital in for up to 5 switches
//  D11 - Devo7e DSC Port "Ring Shunt"  high; goes low when plug is inserted into DSC
//  D13 - PPM Output with LED


int potPin_A1= A1;  //Declare potPin_A1 to be analog pin A1
int potPin_A2= A2;  //Declare potPin_A2 to be analog pin A2
int AI_Raw_A1;        // Analog In raw var - 0->1023
int AI_Raw_A2;        // Analog In raw var - 0->1023
int A1_uS = 750;     // Analog 1 uS var
int A2_uS = 750;     // Analog 2 uS var

int swPin_D1= 6;   //Declare swPin_D1 to be Digital pin 6
int swPin_D2= 7;   //Declare swPin_D2 to be Digital pin 7
int swPin_D3= 8;   //Declare swPin_D3 to be Digital pin 8
int swPin_D4= 9;   //Declare swPin_D4 to be Digital pin 9
int sw1_uS = 750;     // Switch 1
int sw2_uS = 750;     // Switch 2
int sw3_uS = 750;     // Switch 3
int sw4_uS = 750;     // Switch 4 // not used


int outPinPPM = 13;  // Declare ppmPin to be arduino pin 13

int Fixed_uS = 300;       // PPM frame fixed LOW phase
int pulseMin = 750;       // pulse minimum width minus start in uS
int pulseMax = 1700;      // pulse maximum width in uS
int pulseMid = 1180;      // pulse midpoint width in uS

ISR(TIMER1_COMPA_vect) {
    ppmoutput(); // Jump to ppmoutput subroutine
}


void setup() {
  pinMode(potPin_A1, INPUT);  //set potPin_A1 to be an input
  pinMode(potPin_A2, INPUT);  //set potPin_A2 to be an input
  pinMode(swPin_D1, INPUT);  //set swPin_D1 to be an input
  digitalWrite(swPin_D1, HIGH);  // turn on pull-up resistor
  pinMode(swPin_D2, INPUT);  //set swPin_D2 to be an input
  digitalWrite(swPin_D2, HIGH);  // turn on pull-up resistor
  pinMode(swPin_D3, INPUT);  //set swPin_D3 to be an input
  digitalWrite(swPin_D3, HIGH);  // turn on pull-up resistor
   pinMode(swPin_D4, INPUT);  //set swPin_D4 to be an input
  digitalWrite(swPin_D4, HIGH);  // turn on pull-up resistor

  pinMode(outPinPPM, OUTPUT); //set ppmPin to be an OUTPUT
  digitalWrite(outPinPPM, HIGH); // turn on LED


     // Setup timer
  TCCR1A = B00110001; // Compare register B used in mode '3'
  TCCR1B = B00010010; // WGM13 and CS11 set to 1
  TCCR1C = B00000000; // All set to 0
  TIMSK1 = B00000010; // Interrupt on compare B
  TIFR1  = B00000010; // Interrupt on compare B
  OCR1A = 22000; // 22mS PPM output refresh
  OCR1B = 1000;


  Serial.begin(9600);      // turn on Serial Port

}

void ppmoutput() { // PPM output sub


 // Channel 1 - Analog 1
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(A1_uS);  // Hold for A1_uS microseconds 

 // Channel 2 - Analog 2
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(A2_uS);  // Hold for A2_uS microseconds 

// Channel 3 - Switch 1
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(sw1_uS);     // Hold for sw1_uS microseconds 

// Channel 4 - Switch 3
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(sw3_uS);     // Hold for sw2_uS microseconds 

 // Synchro pulse
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);  // Start Synchro pulse

//  Serial.println(rshPinStr + rshPinState);
/* Serial.print("You are writing a value of ");  //for debugging print your values
 Serial.print(A1_uS);
 Serial.print("  ");
 Serial.print(A2_uS);
 Serial.print("  ");
 Serial.print(sw1_uS);
 Serial.print("  ");
 Serial.print(sw2_uS);
 Serial.print("  ");
 Serial.print(sw3_uS);
 Serial.print("  ");
 Serial.print(sw4_uS);
 Serial.print("  ");

 Serial.println(" End");
*/
}

void loop() {


// logic to read each analog input

 // Read analog pins
   AI_Raw_A1 = analogRead(potPin_A1); // Analog Pot 1
   AI_Raw_A2 = analogRead(potPin_A2); // Analog Pot 2
   
 // Map analog inputs to PPM rates for each of the channels
   A1_uS = AI_Raw_A1 + pulseMin;
   A2_uS = AI_Raw_A2 + pulseMin;

 // Check limits
  if (A1_uS <= 750) A1_uS = 750;     // Min
  if (A1_uS >= 1700) A1_uS = 1700;   // Max   
  if (A2_uS <= 750) A2_uS = 750;   // Min
  if (A2_uS >= 1700) A2_uS = 1700; // Max 

  if (digitalRead(swPin_D1) != 1) { // 3-way Switch 1
           sw1_uS = pulseMin;
  } else {
           if (digitalRead(swPin_D2) != 1 ) {
            sw1_uS = pulseMax;
  }        else {
            sw1_uS = pulseMid;
            }
  }
  if (digitalRead(swPin_D3) != 1) { // 3-way Switch 2
           sw3_uS = pulseMin;
  } else {
           if (digitalRead(swPin_D4) != 1 ) {
            sw3_uS = pulseMax;
  }        else {
            sw3_uS = pulseMid;
            }
  }
}

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/
Last edit: 08 Dec 2015 07:26 by Cereal_Killer.

Please Log in or Create an account to join the conversation.

More
08 Dec 2015 11:22 - 08 Dec 2015 12:21 #40683 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
Epyon put up a 2 pot code a while back, which for starting off I think is fine. Now, for adapting it to the digispark would only really be changing the inputs and outputs on it. Could you see if this seems correct? As the digispark uses different I/O names, being marked on the board as P0 to P5, so in this I have put it so Pot 1 uses P2, Pot 2 uses P3, and the PPM output would be on P0, leaving a couple free if anyone wants to try putting a couple of switches on...

From what I've found, pins 0 and 1 are PWM outputs, and 2, 3 and 4 are analogue inputs

// Devo 7e PPM input
// Adapted for Digispark
// Based on sketch by Ian Johnston 
// Based on sketch adaption by Epyon for Arduino Nano V3.0

int AI_Pin_A1 = 2;    // Analog In 1
int AI_Pin_A2 = 3;    // Analog In 2
int AI_Raw_A1;        // Analog In raw var - 0->1023
int AI_Raw_A2;        // Analog In raw var - 0->1023
int A1_uS = 750;     // Analog 1 uS var
int A2_uS = 750;     // Analog 2 uS var

int Fixed_uS = 300;       // PPM frame fixed LOW phase
int pulseMin = 750;       // pulse minimum width minus start in uS
int pulseMax = 1700;      // pulse maximum width in uS

int outPinPPM = 0;       // PPM out on digital pin 0

ISR(TIMER1_COMPA_vect) {
    ppmoutput(); // Jump to ppmoutput subroutine
}

void setup() {

  // Serial.begin(9600) ; // Test

  pinMode(outPinPPM, OUTPUT);   // sets the digital pin as output

   // Setup timer
  TCCR1A = B00110001; // Compare register B used in mode '3'
  TCCR1B = B00010010; // WGM13 and CS11 set to 1
  TCCR1C = B00000000; // All set to 0
  TIMSK1 = B00000010; // Interrupt on compare B
  TIFR1  = B00000010; // Interrupt on compare B
  OCR1A = 22000; // 22mS PPM output refresh
  OCR1B = 1000;
}

void ppmoutput() { // PPM output sub

 // Channel 1 - Analog 1
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(A1_uS);  // Hold for A1_uS microseconds      

 // Channel 2 - Analog 2
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(A2_uS); // Hold for A2_uS microseconds      

// Synchro pulse
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);  // Start Synchro pulse
}

void loop() { // Main loop

 // Read analog pins
   AI_Raw_A1 = analogRead(AI_Pin_A1);
   AI_Raw_A2 = analogRead(AI_Pin_A2);
   
 // Map analog inputs to PPM rates for each of the channels
   A1_uS = AI_Raw_A1 + pulseMin;
   A2_uS = AI_Raw_A2 + pulseMin;

 // Check limits
  if (A1_uS <= 750) A1_uS = 750;     // Min
  if (A1_uS >= 1700) A1_uS = 1620;   // Max   
  if (A2_uS <= 750) A2_uS = 750;   // Min
  if (A2_uS >= 1700) A2_uS = 1620; // Max 
}

From what I've read, the Digispark has 6kb of memory for coding, and this takes up little more than 2kb, so there's plenty to play with on the code, just a limit on the I/O ports... but of course, that all depends on what you want to use the transmitter for!!
Last edit: 08 Dec 2015 12:21 by Epitaph.

Please Log in or Create an account to join the conversation.

More
08 Dec 2015 14:06 #40687 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's
The Digispark seems to have a few specific pins that we might have to work around There is an LED connected to pin P1, the USB port uses pins P3 and P4, and NRESET is P5. These pins can be used and the docs state that they may be used when the USB isn't connected, but when connected they may not work correctly in some situations. As you mentioned, pins P2, P3 and P4 are the ADC pins, but they're numbered different.
Digital 2 is analog (ADC channel) 1
Digital 3 is analog (ADC channel) 3
Digital 4 is analog (ADC channel) 2
Digital 5 is analog (ADC channel) 0

Good reference material is found here.

That being said, it looks to me like we have plenty of I/O. JP3 is the connector and it is numbered 0-5, corresponding to the digital pin number. Here's how I think it goes.
JP3-0 - Digital 0, we can use for one pole of SW1 (3-way)
JP3-1 - Digital 1, we can use for output to PPM, shared by LED
JP3-2 - Analog 1, Input for Pot 1
JP3-3 - Digital 3, used by USB, use for second pole of SW1 (3-way)
JP3-4 - Analog 2, Input for Pot 2
JP3-5 - Digital 5, also NRESET, optional 2-way switch SW2 - can be used as reset for programming

I think the code I attached here has these set up. You're welcome to make whatever changes are needed.

File Attachment:

File Name: Devo7eExtr...park.txt
File Size:5 KB

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum