FlightSImparts.eu
Querit bvba |  Rupelmondestraat 11 | Bazel | 9150 | Belgium
Pokeys microcontrollers 57U Pokeys microcontrollers 57E Pokeys 57U and PoKeys 57E USB and Ethernet versions
Why Choose Us? We offer you a good service if one of our products fail. We will help you out if you do not know how to use our products We will advice you, so that you can use the correct products. We will sent out fast and inform you of shipment. We deliver to customers all over the world.
Arduino and 7-segment displays
Shopping pages
Using 7-segment displays with Arduino and FSX Already some time there is a lot of interest for the Arduino boards in combination with Flight Simulator FSX. Arduino is a small microprocessor board which can be programmed very easy. A lot of people are playing with these boards and there are also numerous examples available so that you could do almost anything without to much trouble. This is a totally different adventure than the PoKeys cards in that the Arduino does nothing without you programming it. These boards are also in no way compatible with the PoKeys cards. Because a lot of people from the flightsim comunity are using this microprocessor, we decided to create a few add on boards for use with Arduino and the first of this will be a 7-segment board based on MAX7219. It will be able to drive 2 sets of 8 digits, so 16 digits with one board. The boards can be coupled to a maximum of 4, so 64 digits can be adressed from 3 ports on a Arduino board. Where to find general information about Arduino... A good starting point for general info: http://playground.arduino.cc/ A lot of tutorials with schematics and how to's:  http://tronixstuff.com/tutorials/ Fun things to do with Arduino http://codeduino.com/projects/ Again lots of examples http://duino4projects.com/ Freeware program with lots of examples Arduino in combination with FSX Flight Simulator A must see if you use FSX  http://www.jimspage.co.nz/intro.htm A very busy forum about Flightsim FSX and Arduino http://www.mycockpit.org/forums/forumdisplay.php?f=323
PoKeys info pages
How about the programming code to drive the MAX 7-segment boards... So here is a standard testing program to see how it works. In this example there is no connection with FSX //We always have to include the library #include "LedControl.h" /*  Now we need a LedControl to work with.  ***** These pin numbers will probably not work with your hardware *****  pin 11 is connected to the DataIn  pin 12 is connected to the CLK  pin 8 is connected to LOAD  We have only a single MAX72XX.  */ LedControl lc=LedControl(11,12,8,1); /* we always wait a bit between updates of the display */ unsigned long delaytime=250; void setup() {   /*    The MAX72XX is in power-saving mode on startup,    we have to do a wakeup call    */   lc.shutdown(0,false);   /* Set the brightness to a medium values */   lc.setIntensity(0,8);   /* and clear the display */   lc.clearDisplay(0); } /*  This method will display the characters for the  word "Arduino" one after the other on digit 0.  */ void writeArduinoOn7Segment() {       lc.setChar(0,0,'a',false);   delay(delaytime);   lc.setRow(0,0,0x05);   delay(delaytime);   lc.setChar(0,0,'d',false);   delay(delaytime);   lc.setRow(0,0,0x1c);   delay(delaytime);   lc.setRow(0,0,B00010000);   delay(delaytime);   lc.setRow(0,0,0x15);   delay(delaytime);   lc.setRow(0,0,0x1D);   delay(delaytime);   lc.clearDisplay(0);   delay(delaytime); } /*   This method will scroll all the hexa-decimal  numbers and letters on the display. You will need at least  four 7-Segment digits. otherwise it won't really look that good.  */ void scrollDigits() {   for(int i=0;i<13;i++) {     lc.setDigit(0,3,i,false);     lc.setDigit(0,2,i+1,false);     lc.setDigit(0,1,i+2,false);     lc.setDigit(0,0,i+3,false);     delay(delaytime);   }   lc.clearDisplay(0);   delay(delaytime); } void loop() { /*  writeArduinoOn7Segment();   scrollDigits();   */     lc.setDigit(0, 0, 1, false);   lc.setDigit(0, 1, 1, false);   lc.setDigit(0, 2, 7, true);   lc.setDigit(0, 3, 4, false);   lc.setDigit(0, 4, 2, false);   delay(1000);   lc.setDigit(0, 5, 6, false);   lc.setDigit(0, 6, 7, false);   lc.setDigit(0, 7, 8, true);   delay(1000);     } That's it, nothing fancy Here is a little snipped how it is done in combination with FSX and Jims excellent program Links2FSX case 'C':    //COMM2 Active         Count = 0;         while (Count < 5 )         {           Digit = "";           Digit += getChar();           if (Digit ==".")             {               Digit = "";               Digit += getChar();             }           Com2Active[Count] = Digit.toInt();           Count++;         }         if (Rotary ==4)         {           //here the frequency is set to the 7-segment displays            led_Display_1.setDigit(0,7,Com2Active[0],false);            led_Display_1.setDigit(0,6,Com2Active[1],false);            led_Display_1.setDigit(0,5,Com2Active[2],true);            led_Display_1.setDigit(0,4,Com2Active[3],false);            led_Display_1.setDigit(0,3,Com2Active[4],false);         }             break;
The boards used in this video were experimental boards, above this text are the real ones