Array sorting with the Aurdino Uno
I was wondering if I could get some help. What I am trying to do is to create an array using the Aurdino Uno to sort 50 random numbers between the range of 0 - 255 which will be represented using binary and then displaying the results using 8 leds and the serial monitor 

while looking on the Aurdino Uno website I manage to find an example of an array here is the code:

    int timer = 100;           // The higher the number, the slower the timing.
    int ledPins[] = {
    2, 7, 4, 6, 5, 3 };       // an array of pin numbers to which LEDs are attached
    int pinCount = 6;           // the number of pins (i.e. the length of the array)

    void setup() {
    int thisPin;
    // the array elements are numbered from 0 to (pinCount - 1).
    // use a for loop to initialize each pin as an output:
    for (int thisPin = 0; thisPin < pinCount; thisPin++)  {
    pinMode(ledPins[thisPin], OUTPUT);      
    }
    }

    void loop() {
    // loop from the lowest pin to the highest:
    for (int thisPin = 0; thisPin < pinCount; thisPin++) {
    // turn the pin on:
    digitalWrite(ledPins[thisPin], HIGH);  
    delay(timer);                  
    // turn the pin off:
    digitalWrite(ledPins[thisPin], LOW);    

    }

    // loop from the highest pin to the lowest:
    for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) {
    // turn the pin on:
    digitalWrite(ledPins[thisPin], HIGH);
    delay(timer);
    // turn the pin off:
    digitalWrite(ledPins[thisPin], LOW);
    }
    }*emphasized text*
   
what my question is how would I change/use this code that I've have found to get the results mentioned above 


P.S I'm sorry if this question is not for this type of forum.

Array sorting with the Aurdino Uno
===

I was wondering if I could get some help. What I am trying to do is to create an array using the Aurdino Uno to sort 50 random numbers between the range of 0 - 255 which will be represented using binary and then displaying the results using 8 leds and the serial monitor 

while looking on the Aurdino Uno website I manage to find an example of an array here is the code:

    int timer = 100;           // The higher the number, the slower the timing.
    int ledPins[] = {
    2, 7, 4, 6, 5, 3 };       // an array of pin numbers to which LEDs are attached
    int pinCount = 6;           // the number of pins (i.e. the length of the array)

    void setup() {
    int thisPin;
    // the array elements are numbered from 0 to (pinCount - 1).
    // use a for loop to initialize each pin as an output:
    for (int thisPin = 0; thisPin < pinCount; thisPin++)  {
    pinMode(ledPins[thisPin], OUTPUT);      
    }
    }

    void loop() {
    // loop from the lowest pin to the highest:
    for (int thisPin = 0; thisPin < pinCount; thisPin++) {
    // turn the pin on:
    digitalWrite(ledPins[thisPin], HIGH);  
    delay(timer);                  
    // turn the pin off:
    digitalWrite(ledPins[thisPin], LOW);    

    }

    // loop from the highest pin to the lowest:
    for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) {
    // turn the pin on:
    digitalWrite(ledPins[thisPin], HIGH);
    delay(timer);
    // turn the pin off:
    digitalWrite(ledPins[thisPin], LOW);
    }
    }*emphasized text*
   
what my question is how would I change/use this code that I've have found to get the results mentioned above 


P.S I'm sorry if this question is not for this type of forum.
