Mbed not working...

14 Feb 2014

Ask whoeveer did it in the US to publish his program/export it to zip, and you import it again. Then try that one and look what is different.

14 Feb 2014

OKay I will do that.

"look what is different"

Well i have literally copy pasted and compiled now this means completely same thing or not? also I have all the hidden files been openly viewed on the mbed, I don't see any other files that is stubborn and causing problem.

15 Feb 2014

Erik,

its the same result with that zipped code too!

15 Feb 2014

This is the following code that does the mbed bad after you run it:

see the function run(putting the post_frame_moreLEDS_testing() or post_frame_moreLEDS_testing_part2() function within the IF conditions and then loading it on the mbed messes up some thing that even if it is corrected in the future code that is loaded on the mbed even after formatting it won't let the mbed work as it was working before)

//-------------------------------------------------------------------------------------------------------------------------------------//
void run(int size1, int size2)   // Call this function with needed parameters of size to get the size for strips LIT part running from Left to Right AND Right to Lef
{
    for(a ; a <= (STRIP_LENGTH + size2 + 3); a++) {
        if(LEDlength_changer == true) {

            if (checkX) {
                if(wave1_endLED <= size2+1) {
                    wave1_startLED = 1;
                    wave1_endLED = INCR_wave1++;
                } else {
                    INCR_wave1 = 1;
                    wave1_startLED++;
                    wave1_endLED = wave1_startLED + size2;
                }

                fill_color(0xFFFFFF, wave1_startLED, wave1_endLED);
                if((wave1_endLED + 1) == (STRIP_LENGTH + size2 + 3)) {
                    wave1_startLED = 0;
                    wave1_endLED = 0;
                    counter_waves = 0;
                    checkX = false;
                    pc.printf("wave 1 done");
                }
                if((wave1_endLED + 1) == (STRIP_LENGTH)) {
                    checkX_part2 = true;
                    a = 0;
                    //pc.printf("hereeeee");
                }
             post_frame_moreLEDS_testing(0x000000, wave1_startLED, wave1_endLED, wave2_startLED, wave2_endLED, wave3_startLED, wave3_endLED, wave4_startLED, wave4_endLED);
                //char cVal[32];
                //sprintf(cVal,"%d",wave1_endLED);
                //pc.printf(cVal);
            }
            if (checkX_part2) {
                if(wave1_endLED_part2 <= size2+1) {
                    wave1_startLED_part2 = 1;
                    wave1_endLED_part2 = INCR_wave1_part2++;
                } else {
                    INCR_wave1_part2 = 1;
                    wave1_startLED_part2++;
                    wave1_endLED_part2 = wave1_startLED_part2 + size2;
                }

                fill_color(0xFFFFFF, wave1_startLED_part2, wave1_endLED_part2);
                if((wave1_endLED_part2 + 1) == (STRIP_LENGTH + size2 + 3)) {
                    wave1_startLED_part2 = 0;
                    wave1_endLED_part2 = 0;
                    counter_waves = 0;
                    checkX_part2 = false;
                    pc.printf("wave 1 part2 done");
                    if((wave1_endLED_part2 + 1) == (STRIP_LENGTH + 3)) {
                        checkX_part3 = true;
                    }
                }
            }
            if (checkX_part3) {
                if(wave1_endLED_part3 <= size2+1) {
                    wave1_startLED_part3 = 1;
                    wave1_endLED_part3 = INCR_wave1_part3++;
                } else {
                    INCR_wave1_part3 = 1;
                    wave1_startLED_part3++;
                    wave1_endLED_part3 = wave1_startLED_part3 + size2;
                }

                fill_color(0xFFFFFF, wave1_startLED_part3, wave1_endLED_part3);
                if((wave1_endLED_part3 + 1) == (STRIP_LENGTH + size2 + 3)) {
                    wave1_startLED_part3 = 0;
                    wave1_endLED_part3 = 0;
                    counter_waves = 0;
                    checkX_part3 = false;
                    pc.printf("wave 1 part3 done");
                }
            }
            if (checkX1) {
                if(wave2_endLED <= size2+1) {
                    wave2_startLED = 1;
                    wave2_endLED = INCR_wave2++;
                } else {
                    INCR_wave2 = 1;
                    wave2_startLED++;
                    wave2_endLED = wave2_startLED + size2;
                }
                fill_color(0xFFFFFF, wave2_startLED, wave2_endLED);
                if((wave2_endLED + 1) == (STRIP_LENGTH + size2 + 3)) {
                    wave2_startLED = 0;
                    wave2_endLED = 0;
                    counter_waves = 0;
                    checkX1 = false;
                    pc.printf("wave 2 done");
                }
            }
            if (checkX2) {
                if(wave3_endLED <= size2+1) {
                    wave3_startLED = 1;
                    wave3_endLED = INCR_wave3++;
                } else {
                    INCR_wave3 = 1;
                    wave3_startLED++;
                    wave3_endLED = wave3_startLED + size2;
                }
                fill_color(0xFFFFFF, wave3_startLED, wave3_endLED);
                if((wave3_endLED + 1)== (STRIP_LENGTH + size2 + 3)) {
                    wave3_startLED = 0;
                    wave3_endLED = 0;
                    counter_waves = 0;
                    checkX2 = false;
                    pc.printf("wave 3 done");
                }
            }
            if (checkX3) {
                if(wave4_endLED <= size2+1) {
                    wave4_startLED = 1;
                    wave4_endLED = INCR_wave4++;
                } else {
                    INCR_wave4 = 1;
                    wave4_startLED++;
                    wave4_endLED = wave4_startLED + size2;
                }
                fill_color(0xFFFFFF, wave4_startLED, wave4_endLED);
                if((wave4_endLED + 1) == (STRIP_LENGTH + size2 + 3)) {
                    wave4_startLED = 0;
                    wave4_endLED = 0;
                    counter_waves = 0;
                    checkX3 = false;
                    pc.printf("wave 4 done");
                }
            }

          
            //post_frame_moreLEDS_testing_part2(0x000000, wave1_startLED_part2, wave1_endLED_part2, wave2_startLED_part2, wave2_endLED_part2, wave3_startLED_part2, wave3_endLED_part2, wave4_startLED_part2, wave4_endLED_part2);
            //wait_ms(4);
            //wait(1);
        }
    }
}