Tell us about yourself!

Complete Your Profile
  • 4x4x4 LED cube upgrade with Shift Registers (74hc595)

    I know this forum is a little out dated, but Im hoping for the best! Im down to the last few lines of page 11 that I have had to fix some very minor things but for some reason I can't figure out the following. I'll start from the void loop. // display pattern in table until DisplayTime is zero (then repeat)void loop(){ // declare variables byte PatternBuf[PLANESIZE]; // saves current pattern from PatternTable int PatternIdx; byte DisplayTime; // time*100ms to display pattern unsigned long EndTime; int plane; // loop counter for cube refresh int patbufidx; // indexes which byte from pattern buffer int ledrow; // counts LEDs in refresh loop int ledcol; // counts LEDs in refresh loop int ledpin; // counts LEDs in refresh loop int pinState; //pinState is used to send the correct...

    see more »

    I know this forum is a little out dated, but Im hoping for the best! Im down to the last few lines of page 11 that I have had to fix some very minor things but for some reason I can't figure out the following. I'll start from the void loop. // display pattern in table until DisplayTime is zero (then repeat)void loop(){ // declare variables byte PatternBuf[PLANESIZE]; // saves current pattern from PatternTable int PatternIdx; byte DisplayTime; // time*100ms to display pattern unsigned long EndTime; int plane; // loop counter for cube refresh int patbufidx; // indexes which byte from pattern buffer int ledrow; // counts LEDs in refresh loop int ledcol; // counts LEDs in refresh loop int ledpin; // counts LEDs in refresh loop int pinState; //pinState is used to send the correct bit to the data pin // Initialize PatternIdx to beginning of pattern table PatternIdx = 0; // loop over entries in pattern table - while DisplayTime>0 do { // read pattern from PROGMEM and save in array memcpy_P( PatternBuf, PatternTable+PatternIdx, PLANESIZE ); PatternIdx += PLANESIZE; // read DisplayTime from PROGMEM and increment index DisplayTime = pgm_read_byte_near( PatternTable + PatternIdx++ ); // compute EndTime from current time (ms) and DisplayTime EndTime = millis() + ((unsigned long) DisplayTime) * TIMECONST; // loop while DisplayTime>0 and current time < EndTime while ( millis() < EndTime ) { patbufidx = 0; // reset index counter to beginning of buffer // loop over planes for (plane=0; plane;); // turn previous plane off (low is off, high is on) if (plane==0) { digitalWrite( PlanePin[CUBESIZE-1], LOW ); } else { digitalWrite( PlanePin[plane-1], LOW ); }/*// load current plane pattern data into portsledpin = 0;for (ledrow=0; ledrow for (ledcol=0; ledcol digitalWrite( LEDPin[ledpin++], PatternBuf[patbufidx] & (1 << ledcol) );}patbufidx++;}*/// I used code from shiftout, to redo this to serialize the plane data//ground latchPin and hold low for as long as you are transmittingdigitalWrite(latchPin, 0);//move 'em outledpin = 0;for (ledrow=0; ledrow;); for (ledcol=0; ledcol;);digitalWrite(clockPin, 0);// digitalWrite( dataPin, PatternBuf[patbufidx] & (1 << ledcol) );if (PatternBuf[patbufidx] & (1 << ledcol)){pinState= 0; // Flip these bits to suit your cubes common lead (cathode or anode)}else{pinState= 1; // Flip these bits to suit your cubes common lead (cathode or anode)}//Sets the pin to HIGH or LOW depending on pinStatedigitalWrite(dataPin, pinState); // this is where data is sent to the shift register.//register shifts bits on upstroke of clock pindigitalWrite(clockPin, 1);ledpin++;}patbufidx++;}****************************************************but this line below is whats give me proplems. says something about putting in a 'while' so I do, but then it says "could not convert 'digitalWrite(((uint8_t)latchPin), 1u)' from 'void' to 'bool'".digitalWrite(latchPin, 1);****************************************************// turn current plane on (plane high for on)digitalWrite( PlanePin[plane], HIGH );// delay PLANETIME usdelayMicroseconds( PLANETIME );} // for plane} // while } while (DisplayTime > 0); // read patterns until time=0 which signals end}So, if someone wouldnt mind helping me out!!Thanks A Bunch!!

    View Instructable »
  • jasonjason931 followed jollifactory7 months ago
      • JolliCube (8x8x8 LED Cube) With MD_Cubo Library
      • Arduino Based Mini Audio Spectrum Visualizer
      • 3D Stereo Audio Spectrum Visualizer
  • Simple RC car for beginners (Android control over Bluetooth)

    Okay so I tried what you said to do, but still keep getting socket fail, whenever I try it on my phone.

    View Instructable »
  • Simple RC car for beginners (Android control over Bluetooth)

    Thanks! I'll give that a try! And let you know!

    View Instructable »
  • Simple RC car for beginners (Android control over Bluetooth)

    got the car assembled but when i try to test it, it comes up with "socket fail" and wont go or do anything. can someone help me with this? do i need to change anything in the code?

    View Instructable »
  • CxemCAR 1 - Android Control RC Car over Bluetooth

    I cant find or figure out how to download the cxem car 1.0 program. the closest thing i can find is from the googleplay store called "wn-bluetooth car" anyone have the program and willing to post it somewhere so i could get it??!!

    View Instructable »