Jump to content

Felm

Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by Felm

  1. I'm a bit stuck.... I got everything to work but I have an issue where my digits will shift to the left when less that 10. so for example a 1-15 frequency selector, 10-15 are displayed fine but 3-9 become 30,40,50,60,70,80,90 and then it goes normally to 10,11,12,13,14,15 and then back to 30,40 etc [edit: removed the10,20 since freqs start at 3] here is the relevant code : I thought of maybe telling it to check if the value is less than 10 then to write directly to digit 2 (the physical 7seg digit I mean) and if its more than 10 to write to both digits but I didn't manage to make it work. something like this: I tried many variations of the above but I'm lacking some fundamental understanding on how it works so I end up with compiler errors when trying to convert char* to int. Or it compiles ok but to no effect. I tried to use "atoi" and a=b-'0' but no luck. My code looks like shit, I know :(
  2. Quick update! I testing things right now and managed to export some frequencies to the 7seg very easily. However this only works for the 0-9 frequencies. Now I am trying to see how to get the >9 frequencies broken down in 0-9 numbers and assign each to a different 7seg. So for example a frequency of 75 will become '7' and sent over to digit0 (7seg digit) and '5' sent over to digit1. I believe this has to do with breaking down strings into integers and then sending those integers to different leds. I have to look into how to do that now.
  3. Thanks! I was looking in the A10c section, that's why I couldnt find it!
  4. I might just be stupid blind here but where did you get these values? I can't find them in the control reference.
  5. They have some cool stuff there, thanks! I already have my displays and chips though but I will keep them in mind for my next project. Thank you for all the advice! it's really great that you are helping people do what they want with your software. Hopefully I will be able to contribute back by figuring out how to do it and posting it here for other people to use in the future. Right now my priority is to export the radio frequencies to 7seg leds driven by the max7219. Then I will look into the shift register thing. I also have a few 16x2 lcsd lying around but I will leave those for last. I will let you know how it goes, I will definitely have many more questions once I get into it. :joystick:
  6. I'm ok with building the circuit (true on the resistors though, it's a pain) but I'm not sure my coding skills are up to the task of implementing the shifting without taking a silly amount of time. Even conceptually it's difficult to see how to shift in the data from a single pin when DCS-BIOS is expecting different pins to trigger. I'm ok-ish with cannibalising code and making small modifications but I don't think I can write it from zero or make very complicated additions. Thanks for the advice on the radio freqs, I completely missed that part! So I can get the position of the frequency selector as an integer(string?) output. Now I have to figure out a way to send it to the ledcontrol library so the max7219 can drive the correct leds, right?. I will hopefully get some time to look a bit better at the libraries and reference documents tomorrow night. It will probably help me understand better what I have to do.
  7. Ok thanks for the info! Are you and Warhog working only on a UHF repeater or also on the other radios? Just asking because I noticed that you can already export the repeater to an 16x2 (or whatever size) lcd with DCS-BIOS but not the vhf fm/am values. Is that possible? How hard would it be link with the max7219 library? I agree with you that shift registers add a lot of unnecessary complexity that can very easily be bypassed with an extra board. I was thinking of using them because I have a lot lying around but it's smarter to just get a new mega or uno and link them like you showed in your video.
  8. Wow, great job Ian! This is really amazing. :thumbup: Big thanks for all the effort, very much appreciated. I read that you were working on the code for using 7seg digits with MAX7219 drivers, how is that going? I can't wait to start exporting radio frequencies to 7segments especially since you made rotary encoders so easy to implement. Speaking of inputs, what are the plans for shift register or multiplexer integration? For example the 74hc165 for inputs and 74hc595 for outputs . I'm running out of pins on my 2 megas and was wondering if I should start working on a 74hc165 based circuit (or buy another mega?). For analog like pots there's also the cd4051 multiplexer which can increase analog ports. One last thing, I noticed that you didn't include some stuff that are not in the cockpit per se like night vision goggles on/off, their gain, the eject button. Everyone wants an eject button! Sorry if I missed them. Again, thanks for all this!:thumbup:
×
×
  • Create New...