• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About JoshTheCoward

  • Rank
    Bottle Rocketeer
  1. Here is an update of my controller. Thanks everyone for the help.
  2. Ok so I rewrote it to That does not seem to work either. Update: I just re-assigned one of the buttons to my stage button and it worked no problem, do the physical button is working. Update2: Never Mind I was using Serial inputs and it was messing it up.
  3. How do I get it to change state with button push? if (digitalRead(SMSAS)) { setSASMode(SMSAS); } This doesn't seem to work I want it to work: If SAS switch is on then: if prograde button is pushed then switch to prograde .... else SAS is off Here is my code: void controls() { if (Connected) { if (digitalRead(SASPIN)) { MainControls(SAS, HIGH); if (digitalRead(SMSAS)) { setSASMode(SMSAS); } if (digitalRead(SMPrograde)) { setSASMode(SMPrograde); } if (digitalRead(SMRetroGrade)) { setSASMode(SMRetroGrade); } if (digitalRead(SMNormal)) { setSASMode(SMNormal); } if (digitalRead(SMAntinormal)) { setSASMode(SMAntinormal); } if (digitalRead(SMRadialIn)) { setSASMode(SMRadialIn); } if (digitalRead(SMRadialOut)) { setSASMode(SMRadialOut); } if (digitalRead(SMTarget)) { setSASMode(SMTarget); } if (digitalRead(SMAntiTarget)) { setSASMode(SMAntiTarget); } if (digitalRead(SMManeuverNode)) { setSASMode(SMManeuverNode); } } else { MainControls(SAS, LOW); }
  4. I am trying to do the same thing, i think. I have a master switch for SAS ON/OFF. But I want 10 buttons to change the state of SAS once it is on. I have tried putting just a separate if statement but that doesn't seem to help
  5. I have been reading up on this but may be a little over my head. Do I make an array and send it through the shift register as a binary number? or do I keep it as the variables I already have? but how do I send those through the register?
  6. Thanks for the tips, I will do some research. I have 46 wires right now. I bought digital joystick with out know whick killed me. Now need 2 inputs per axis so 12 just for attitude and translation. 22 for anuciator LEDs and 6 for switches, 10 for was buttons, 3 for speed selector, 1 throttle, 1 abort, 1 stage. So need 56 in total. Also thinking of adding a few readouts. Yes a lot of wires. Is there a better way of doing it?
  7. I am about 3 pins short on a mega board. Is there a module you can buy to give you more pins?
  8. That is probably it. Is there a way to use the pullups resisters on the Arduino? Sorry again for being a noob.
  9. Don't know what the code tag is. but here is my code. if (digitalRead(WPIN)){ CPacket.Pitch = -500; } else if (digitalRead(SPIN)){ CPacket.Pitch = 500; } else { CPacket.Pitch = 0; } But it starts out 500 pitch in the one direction. Once you press the opposited direction it goes to 500 the other way but then returns to 500 the other way.
  10. What does the code for this look like feels like i've tried everything.
  11. OK bit of a noob, how do I program that in the Arduino code? Tried doing it like the SAS and rcs but that did not work.
  12. I got my joysticks today and all they are is 4 limit switches at the base for direction. Can I use digital input instead of analog? How would I program that?
  13. Sorry I am new to this, I apologize if this is a dumb question. Is the drivers for the arduino? Would the Leonardo be affected too? Edit: Never mind tried Arduino Leonardo on Win10 and it works perfect! Thanks so much guys cant wait to finish my build. Edit 2: Works perfect on my Mega 2560 as well on Win10
  14. Do you think there will be a fix for the no inputs for windows 10 at some point or should I install a copy of 7 again?