Ghostchips Posted March 12, 2016 Author Share Posted March 12, 2016 New brake lining. It's a bit too thick but i will make it work. Edit: Someone donated me some V12 Lincoln wheel studs to replace those crappy galvanized bolts. 3 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted July 13, 2016 Author Share Posted July 13, 2016 Ugh, close enough. Cant be bothered fitting it better at the moment. Think i'll sand the paint off though. 6 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted September 8, 2017 Author Share Posted September 8, 2017 Hood tie down strap made from a leather belt. The belt is so long it forms a loop for someone 3 times my size. Could wrap that around my waist 3 times before it met the first belt hole, and it has a functional lock in it. Why would it have a lock? So i don't know if i should start a technical thread on "How to make trembler coils" as mine are toast and one of the borrowed ones died today. Never successfully made an ignition coil before, i think i'll need help of the electrical gurus on here. 7 1 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted October 4, 2017 Author Popular Post Share Posted October 4, 2017 Someone had deemed these "junk" and left them in a fish bin full of water outside for a year. Some time ago i cut open a dead RB25 coil hoping to see what was inside. Such fine wire, so many windings. About a million of the finest wire windings i had ever seen, trapped in resin plastic, sealed and unable to be unwound at all. At least by any methods i could see. These 100 year old ford ones remind me of the same thing, except the wire is slightly thicker and there is 2 lots of 1million windings. 2 per coil around a heavy primary winding. Accidentally put a chisel into the primary and is still works. Not for 100 years anymore as it'll corrode now it's damaged but still... not many ignition coils you can pull the windings out of, involving chipping away or melting the tar they were packed in. Those brown paper things are capacitors. Condensers effectively, like you have for a distributor. While i'd heard of old timers making their own from paper and chewing gum wrappers back in the 1940s when they were poor kids fixing their first car... i'm not that keen. These had real tin foil, not the alloy foil we have today so they solder really nicely. A couple tested within spec' so i re-used them. Others i replaced with orange things. Mix and matched the wood. And going ot do the same with the burnt out windings so i can turn 8 burnt ones into 4 good ones... hopefully. Had some burn up after 10 minutes of driving because i didn't realize how keen they were to have inch long sparks jumping inside the box if i didn't put the glass plates and tar back in. Opps. Bit marked up, some have clear borer holes in them but not too bad for 100 year old ignition parts. How many of you are still running original coils and points at 1/3rd the age? 23 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted April 6, 2018 Author Share Posted April 6, 2018 4 3 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted June 14, 2018 Author Popular Post Share Posted June 14, 2018 Have i tried to sell you on the merits of LED lights lately? Even on high beam the amps draw is maybe... 1.2 amp? According to a century old gauge anyway... much less than the 10 amps they were previously drawing. And other people can actually see the lights now. 19 1 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted September 3, 2018 Author Share Posted September 3, 2018 RockAuto is really low on stock, wonder why. Factory drop spindles still available, used. No UK spec' ones available though.... NZ got canada spec ones. 6 1 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted February 10, 2019 Author Popular Post Share Posted February 10, 2019 So some of you are really into programmable ignition and electronic sensors. I tried to make my own electronic ignition. After 3 seconds one of the MOSFETS running a coil shorted out. After 7 seconds all of them had. Each mosfet was rated at 20 amps. But considering they were dealing with the primary and ... lets face it. some of the secondary output (These old timers are like that) i don't think they were up to the million volt task. At least 2 hall effect sensors survived. Barely. 14 1 1 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted July 24, 2019 Author Popular Post Share Posted July 24, 2019 "Straight through" Holley NH carb's share many parts with the economy version carb'. Same basic thing, but the economy version had more restriction. I'd be tempted to smooth the venturi a little, as it has a rough finish, but don't want to mess it up. I'll choose to believe that rust pitting help the mixture. So i filled in some pitting around the rim of the bowl seal with an epoxy. Used white metal normally used for engine bearings to build up work throttle shafts. Drilled small holes in the broken castings and poured white metal into them to build up the areas where casting had broken off. Built up the worn nut with more white metal. First i tried to replace the bronze throttle link with chunks cut from a worn bronze bushing, that turned out to be fragile. So i riveted and soldered, with more white metal (more resilient to vibration than solder due to no lead content) copper strips. I choose to believe i have improved this carb's condition compared to when i found it. 13 2 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted August 16, 2019 Author Popular Post Share Posted August 16, 2019 The tail lamp was suffering metal fatigue. Not surprising, given its alloy. So i made one fitted for the electric light. (re-used the old glass) That's not paint, that's indian head shellac. 10 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted August 16, 2019 Author Share Posted August 16, 2019 So i heard you think recycled plastic is crap? I disagree. I am an enthusiast of it now. 3 1 3 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted September 1, 2019 Author Share Posted September 1, 2019 Diff' oil is sparkly.https://youtu.be/Mle73Vxxipw So i put a camera in there. Nothing much to see. 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted September 3, 2019 Author Share Posted September 3, 2019 This would be awesome if it didn't make so much interference. 2 1 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted September 12, 2019 Author Popular Post Share Posted September 12, 2019 So i tried making my own coil on plug system with a piece of plywood with magnets glued in it in the front of the cam, an arduino pro mini with sensors mounted on the front of that, a sheet of plastic (Made from melted milk bottles & bottle caps) with copper screwed to it to distribute power i know those aren't proper ferrite toroids but thaat's just too bad. Wrapped in a tin foil tape to try & keep interference out (probably keeps it in?) The cool kids have MS paint graphs & stuff so i'll try be be cool too. The red curve is a rough approximation of how the standard magneto behaves. The green one could be programmed any way i like. If i put a high(er) compression overhead head valve head on it, then i can program a curve to take advantage of it. It'll also make old grumpy people sad. Most people just use a distributor conversion. 11 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted September 12, 2019 Author Share Posted September 12, 2019 Video of it almost running. Cannot seem to get the mixture quite right. 8 1 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted September 13, 2019 Author Popular Post Share Posted September 13, 2019 Turns out i need to use the cylindrical style transformers, they need a longer ramp up time of at least 8 milliseconds, ideally 10-12. The little cube ones are nice but they seem to foul. Although the cube style produce a hot enough spark to burn paper & start to melt the spark plug electrodes, when fouled with fuel they can't even light a pan of fuel. The cylinder style build up a charge and discharge it all at once, this appears to help with the 'self cleaning' effect. A big plug gap will make them lag like crazy, but the spark is loud enough to hear from outside the engine block. 8 2 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted September 26, 2019 Author Popular Post Share Posted September 26, 2019 Ardunio nano on a small board with some hall effect sensors. installed in the end of an old can, some melted plastic in the holes, light passes through the plastic so i know where to drill it to put the bolts through. 15 4 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted September 30, 2019 Author Share Posted September 30, 2019 Picture-less update. While i will still need to dial in the auto-advance curve (the orig' relied on a combination of moving a lever to a basic range, and the magnets on the flywheel ramping up the speed of the points opening) it has a notable improvement in fuel economy, partly due to being able to wind the fuel mixture screw in 1/16th of a turn & have the same performance. It's like having the magneto set perfectly. But requires a battery. 6 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted October 29, 2019 Author Share Posted October 29, 2019 I can wind the mixture screw in 1/8th and not melt the pistons. i also made a music player for summer. The first one, had no support for remembering where it stopped playing when it was turned off & i didn't want to stress the EEPROM by writing to it every time you changed a song. So i made this hilarious work around. The first one, had no support for remembering where it stopped playing when it was turned off & i didn't want to stress the EEPROM by writing to it every time you changed a song. So i made this hilarious work around. Ultra capacitors running the player for a few seconds after it is turned off. /*************************************************** * A basic MP3 player for a car, that was never designed for a radio. * connect to an amplifier for enhanced sound. Anything better than the single MOSFET i used should be fine. * in this version i attempted to overcome its habit of not playing the next track, but i don't know how to read the 'Finished playing' from the serial... * I derived this code from ... * DFPlayer - A Mini MP3 Player For Arduino <https://www.dfrobot.com/index.php?route=product/product&product_id=1121> *************************************************** This example shows the all the function of library for DFPlayer. Created 2016-12-07 By [Angelo qiao](Angelo.qiao@dfrobot.com) GNU Lesser General Public License. See <http://www.gnu.org/licenses/> for details. All above must be included in any redistribution ****************************************************/ /***********Notice and Trouble shooting*************** 1.Connection and Diagram can be found here <https://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299#Connection_Diagram> 2.This code is tested on Arduino Uno, Leonardo, Mega boards. ****************************************************/ #include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" # define ACTIVATED LOW SoftwareSerial mySoftwareSerial(10, 11); // RX, TX DFRobotDFPlayerMini myDFPlayer; void printDetail(uint8_t type, int value); int buttonPause = 3; int buttonVolPlus = 4; int buttonVolMinus = 2; int buttonNext = 6; int buttonPrev = 7; int buttonFolderNext = 8; int buttonFolderPrev = 5; int theReadStatus = 0; long unsigned theReadStatusTimer = 0; int currentFileNumber = 1; int busyReadPin = A1; int readCurrentFileNumber(uint8_t device); long unsigned currentMillis = 0; int thisChar; boolean isPlaying = true; int trackCount = 0; int oldtrackCount = 0; int folderCount = 0; int oldfolderCount = 0; String inputString = ""; // a String to hold incoming data bool stringComplete = false; // whether the string is complete void setup() { # define Start_Byte 0x7E # define Version_Byte 0xFF # define Command_Length 0x06 # define End_Byte 0xEF # define Acknowledge 0x00 //Returns info with command 0x41 [0x01: info, 0x00: no info] pinMode(buttonPause, INPUT); digitalWrite(buttonPause,HIGH); pinMode(buttonVolPlus, INPUT); digitalWrite(buttonVolPlus,HIGH); pinMode(buttonVolMinus, INPUT); digitalWrite(buttonVolMinus,HIGH); pinMode(buttonNext, INPUT); digitalWrite(buttonNext,HIGH); pinMode(buttonPrev, INPUT); digitalWrite(buttonPrev,HIGH); pinMode(buttonFolderNext, INPUT); digitalWrite(buttonFolderNext,HIGH); pinMode(buttonFolderPrev, INPUT); digitalWrite(buttonFolderPrev,HIGH); pinMode(busyReadPin, INPUT); digitalWrite(busyReadPin,LOW); mySoftwareSerial.begin(9600); Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } inputString.reserve(200); // reserve 200 bytes for the inputString: Serial.println(); Serial.println(F("DFRobot DFPlayer Mini Demo")); Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)")); if (!myDFPlayer.begin(mySoftwareSerial)) { //Use softwareSerial to communicate with mp3. Serial.println(F("Unable to begin:")); Serial.println(F("1.Please recheck the connection!")); Serial.println(F("2.Please insert the SD card!")); while(true); } Serial.println(F("DFPlayer Mini online.")); myDFPlayer.setTimeOut(500); //Set serial communictaion time out 500ms //----Set volume---- myDFPlayer.volume(05); //Set volume value (0~30). myDFPlayer.volumeUp(); //Volume Up myDFPlayer.volumeDown(); //Volume Down myDFPlayer.play(1); //----Set different EQ---- myDFPlayer.EQ(DFPLAYER_EQ_NORMAL); // myDFPlayer.EQ(DFPLAYER_EQ_POP); // myDFPlayer.EQ(DFPLAYER_EQ_ROCK); // myDFPlayer.EQ(DFPLAYER_EQ_JAZZ); // myDFPlayer.EQ(DFPLAYER_EQ_CLASSIC); // myDFPlayer.EQ(DFPLAYER_EQ_BASS); //----Set device we use SD as default---- // myDFPlayer.outputDevice(DFPLAYER_DEVICE_U_DISK); myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD); // myDFPlayer.outputDevice(DFPLAYER_DEVICE_AUX); // myDFPlayer.outputDevice(DFPLAYER_DEVICE_SLEEP); // myDFPlayer.outputDevice(DFPLAYER_DEVICE_FLASH); //----Mp3 control---- // myDFPlayer.sleep(); //sleep // myDFPlayer.reset(); //Reset the module // myDFPlayer.enableDAC(); //Enable On-chip DAC // myDFPlayer.disableDAC(); //Disable On-chip DAC // myDFPlayer.outputSetting(true, 15); //output setting, enable the output and set the gain to 15 //----Read imformation---- Serial.println(myDFPlayer.readState()); //read mp3 state Serial.println(myDFPlayer.readVolume()); //read current volume Serial.println(myDFPlayer.readEQ()); //read EQ setting Serial.println(myDFPlayer.readFileCounts()); //read all file counts in SD card Serial.println(myDFPlayer.readCurrentFileNumber()); //read current play file number Serial.println(myDFPlayer.readFileCountsInFolder(3)); //read fill counts in folder SD:/03 isPlaying = true; myDFPlayer.enableLoopAll(); } void loop() { if (digitalRead(buttonPause) == ACTIVATED) { if(isPlaying) { Serial.print( " Paused " ); delay(20); myDFPlayer.pause(); isPlaying = false; } else { Serial.print( " Play " ); delay(20); isPlaying = true; myDFPlayer.start(); } } delay(20); if (digitalRead(buttonVolPlus) == ACTIVATED) { if(isPlaying) { Serial.print( " Vol-Up " ); myDFPlayer.volumeUp(); delay(10); } } if (digitalRead(buttonVolMinus) == ACTIVATED) { Serial.print( " Vol-Down " ); myDFPlayer.volumeDown(); delay(10); } if (digitalRead(buttonNext) == ACTIVATED) { if(isPlaying) { Serial.print( " Button Next " ); trackCount++; myDFPlayer.next(); delay(20); } } if (digitalRead(buttonPrev) == ACTIVATED) { if(isPlaying) { Serial.print( " Button Prev' " ); myDFPlayer.previous(); trackCount--; delay(20); } } if (digitalRead(buttonFolderNext) == ACTIVATED) { if(isPlaying) { Serial.print( " Button folder+ " ); folderCount++; Serial.print(folderCount); folderChange(); delay(20); } } if (digitalRead(buttonFolderPrev) == ACTIVATED) { if(isPlaying) { Serial.print( " Button folder- " ); folderCount--; Serial.print(folderCount); folderChange(); delay(20); } } if (myDFPlayer.available()) { printDetail(myDFPlayer.readType(), myDFPlayer.read()); //Print the detail message from DFPlayer to handle different errors and states. } while (myDFPlayer.available()) { char inChar = ((char)(myDFPlayer.read())); //This method is a work-around for me being too dumb. Serial.print(myDFPlayer.readType(), myDFPlayer.read()); //I'm too dumb to figure out ho to read the "play finished" output as a string? if (inChar != 0) //So i came up with this, Disgusting! it's just using any data while playing to 'auto-next'. if(isPlaying) //Even interference from a spark plug could trigger this. Shield your wires? { Serial.print( " Auto-Button Next " ); trackCount++; myDFPlayer.next(); delay(20); inChar = 0; } } delay(120); } void folderChange() { if (folderCount == 1) { myDFPlayer.play((5)); Serial.print(" 5 "); } else if (folderCount == 2) { myDFPlayer.play((10 + trackCount)); Serial.print(" 10 + "); Serial.print(trackCount); } else if (folderCount == 3) { myDFPlayer.play((15 + trackCount)); Serial.print(" 15 + "); Serial.print(trackCount); } else if (folderCount == 4) { myDFPlayer.play((20 + trackCount)); Serial.print(" 20 + "); Serial.print(trackCount); } else if (folderCount == 5) { myDFPlayer.play((25 + trackCount)); Serial.print(" 25 + "); Serial.print(trackCount); } else if (folderCount == 6) { myDFPlayer.play((30 + trackCount)); Serial.print(" 30 + "); Serial.print(trackCount); } else if (folderCount == 7) { myDFPlayer.play((35 + trackCount)); Serial.print(" 35 + "); Serial.print(trackCount); } else if (folderCount == 8) { myDFPlayer.play((40 + trackCount)); Serial.print(" 40 + "); Serial.print(trackCount); } else if (folderCount == 9) { myDFPlayer.play((45 + trackCount)); Serial.print(" 45 + "); Serial.print(trackCount); } else if (folderCount == 10) { myDFPlayer.play((50 + trackCount)); Serial.print(" 50 + "); Serial.print(trackCount); } else if (folderCount == 11) { myDFPlayer.play((55 + trackCount)); Serial.print(" 55 + "); Serial.print(trackCount); } else if (folderCount == 12) { myDFPlayer.play((60 + trackCount)); Serial.print(" 60 + "); Serial.print(trackCount); } else if (folderCount == 13) { myDFPlayer.play((65 + trackCount)); Serial.print(" 65 + "); Serial.print(trackCount); } else if (folderCount == 14) { myDFPlayer.play((70 + trackCount)); Serial.print(" 70 + "); Serial.print(trackCount); } else if (folderCount == 15) { myDFPlayer.play((75 + trackCount)); Serial.print(" 75 + "); Serial.print(trackCount); } else if (folderCount == 16) { myDFPlayer.play((80 + trackCount)); Serial.print(" 80 + "); Serial.print(trackCount); } else if (folderCount == 17) { myDFPlayer.play((85 + trackCount)); Serial.print(" 85 + "); Serial.print(trackCount); } else if (folderCount == 18) { myDFPlayer.play((90 + trackCount)); Serial.print(" 90 + "); Serial.print(trackCount); } else if (folderCount == 19) { myDFPlayer.play((95 + trackCount)); Serial.print(" 95 + "); Serial.print(trackCount); } else if (folderCount == 20) { myDFPlayer.play((100 + trackCount)); Serial.print(" 100 + "); Serial.print(trackCount); } else if (folderCount == 21) { myDFPlayer.play((105 + trackCount)); Serial.print(" 105 + "); Serial.print(trackCount); } else if (folderCount == 22) { myDFPlayer.play((110 + trackCount)); Serial.print(" 110 + "); Serial.print(trackCount); } else if (folderCount == 23) { myDFPlayer.play((115 + trackCount)); Serial.print(" 115 + "); Serial.print(trackCount); } else if (folderCount == 24) { myDFPlayer.play((120 + trackCount)); Serial.print(" 120 + "); Serial.print(trackCount); } else if (folderCount == 25) { myDFPlayer.play((125 + trackCount)); Serial.print(" 125 + "); Serial.print(trackCount); } else if (folderCount == 26) { myDFPlayer.play((130 + trackCount)); Serial.print(" 130 + "); Serial.print(trackCount); } else if (folderCount == 27) { myDFPlayer.play((135 + trackCount)); Serial.print(" 135 + "); Serial.print(trackCount); } else if (folderCount == 28) { myDFPlayer.play((140 + trackCount)); Serial.print(" 140 + "); Serial.print(trackCount); } else if (folderCount == 29) { myDFPlayer.play((145 + trackCount)); Serial.print(" 145 + "); Serial.print(trackCount); } else if (folderCount == 30) { myDFPlayer.play((150 + trackCount)); Serial.print(" 150 + "); Serial.print(trackCount); } else if (folderCount == 31) { myDFPlayer.play((155 + trackCount)); Serial.print(" 155 + "); Serial.print(trackCount); } else if (folderCount == 32) { myDFPlayer.play((160 + trackCount)); Serial.print(" 160 + "); Serial.print(trackCount); } else if (folderCount == 33) { myDFPlayer.play((165 + trackCount)); Serial.print(" 165 + "); Serial.print(trackCount); } else if (folderCount == 34) { myDFPlayer.play((170 + trackCount)); Serial.print(" 170 + "); Serial.print(trackCount); } else if (folderCount == 35) { myDFPlayer.play((175 + trackCount)); Serial.print(" 175 + "); Serial.print(trackCount); } else if (folderCount == 36) { myDFPlayer.play((180 + trackCount)); Serial.print(" 180 + "); Serial.print(trackCount); } else if (folderCount == 37) { myDFPlayer.play((185 + trackCount)); Serial.print(" 185 + "); Serial.print(trackCount); } else if (folderCount == 38) { myDFPlayer.play((190 + trackCount)); Serial.print(" 190 + "); Serial.print(trackCount); } else if (folderCount == 39) { myDFPlayer.play((195 + trackCount)); Serial.print(" 195 + "); Serial.print(trackCount); } else if (folderCount == 40) { myDFPlayer.play((200 + trackCount)); Serial.print(" 200 + "); Serial.print(trackCount); } else if (folderCount == 41) { myDFPlayer.play((205 + trackCount)); Serial.print(" 205 + "); Serial.print(trackCount); } else if (folderCount == 42) { myDFPlayer.play((210 + trackCount)); Serial.print(" 210 + "); Serial.print(trackCount); } else if (folderCount == 43) { myDFPlayer.play((215 + trackCount)); Serial.print(" 215 + "); Serial.print(trackCount); } else if (folderCount == 44) { myDFPlayer.play((220 + trackCount)); Serial.print(" 220 + "); Serial.print(trackCount); } else if (folderCount == 45) { myDFPlayer.play((225 + trackCount)); Serial.print(" 225 + "); Serial.print(trackCount); } else if (folderCount == 46) { myDFPlayer.play((230 + trackCount)); Serial.print(" 230 + "); Serial.print(trackCount); } else if (folderCount == 47) { myDFPlayer.play((235 + trackCount)); Serial.print(" 235 + "); Serial.print(trackCount); } else if (folderCount == 48) { myDFPlayer.play((240 + trackCount)); Serial.print(" 240 + "); Serial.print(trackCount); } else if (folderCount == 49) { myDFPlayer.play((245+ trackCount)); Serial.print(" 245 + "); Serial.print(trackCount); } else if (folderCount == 50) { myDFPlayer.play((250 + trackCount)); Serial.print(" 250 + "); Serial.print(trackCount); } else if (folderCount == 51) { myDFPlayer.play((255 + trackCount)); Serial.print(" 255 + "); Serial.print(trackCount); } else if (folderCount == 52) { myDFPlayer.play((260 + trackCount)); Serial.print(" 260 + "); Serial.print(trackCount); } else if (folderCount == 53) { myDFPlayer.play((265 + trackCount)); Serial.print(" 265 + "); Serial.print(trackCount); } else if (folderCount == 54) { myDFPlayer.play((270 + trackCount)); Serial.print(" 270 + "); Serial.print(trackCount); } else if (folderCount == 55) { myDFPlayer.play((275 + trackCount)); Serial.print(" 275 + "); Serial.print(trackCount); } else if (folderCount == 56) { myDFPlayer.play((280 + trackCount)); Serial.print(" 280 + "); Serial.print(trackCount); } else if (folderCount == 57) { myDFPlayer.play((285 + trackCount)); Serial.print(" 285 + "); Serial.print(trackCount); } else if (folderCount == 58) { myDFPlayer.play((290 + trackCount)); Serial.print(" 290 + "); Serial.print(trackCount); } else if (folderCount == 59) { myDFPlayer.play((295 + trackCount)); Serial.print(" 295 + "); Serial.print(trackCount); } else if (folderCount == 60) { myDFPlayer.play((300 + trackCount)); Serial.print(" 300 + "); Serial.print(trackCount); } else if (folderCount == 61) { myDFPlayer.play((305 + trackCount)); Serial.print(" 305 + "); Serial.print(trackCount); } else if (folderCount == 62) { myDFPlayer.play((310 + trackCount)); Serial.print(" 310 + "); Serial.print(trackCount); } else if (folderCount == 63) { myDFPlayer.play((315 + trackCount)); Serial.print(" 315 + "); Serial.print(trackCount); } else if (folderCount == 64) { myDFPlayer.play((320 + trackCount)); Serial.print(" 320 + "); Serial.print(trackCount); } else if (folderCount == 65) { myDFPlayer.play((325 + trackCount)); Serial.print(" 325 + "); Serial.print(trackCount); } else if (folderCount == 66) { myDFPlayer.play((330 + trackCount)); Serial.print(" 330 + "); Serial.print(trackCount); } else if (folderCount == 67) { myDFPlayer.play((335 + trackCount)); Serial.print(" 335 + "); Serial.print(trackCount); } else if (folderCount == 68) { myDFPlayer.play((340 + trackCount)); Serial.print(" 340 + "); Serial.print(trackCount); } else if (folderCount == 69) { myDFPlayer.play((345 + trackCount)); Serial.print(" 345 + "); Serial.print(trackCount); } else if (folderCount == 70) { myDFPlayer.play((350 + trackCount)); Serial.print(" 350 + "); Serial.print(trackCount); } else if (folderCount == 71) { myDFPlayer.play((355 + trackCount)); Serial.print(" 355 + "); Serial.print(trackCount); } else if (folderCount == 72) { myDFPlayer.play((360 + trackCount)); Serial.print(" 360 + "); Serial.print(trackCount); } delay(50); } void printDetail(uint8_t type, int value){ switch (type) { case TimeOut: Serial.println(F("Time Out!")); break; case WrongStack: Serial.println(F("Stack Wrong!")); break; case DFPlayerCardInserted: Serial.println(F("Card Inserted!")); break; case DFPlayerCardRemoved: Serial.println(F("Card Removed!")); break; case DFPlayerCardOnline: Serial.println(F("Card Online!")); break; case DFPlayerPlayFinished: Serial.print(F("Number:")); Serial.print(value); Serial.println(F(" Play Finished!")); break; case DFPlayerError: Serial.print(F("DFPlayerError:")); switch (value) { case Busy: Serial.println(F("Card not found")); break; case Sleeping: Serial.println(F("Sleeping")); break; case SerialWrongStack: Serial.println(F("Get Wrong Stack")); break; case CheckSumNotMatch: Serial.println(F("Check Sum Not Match")); break; case FileIndexOut: Serial.println(F("File Index Out of Bound")); break; case FileMismatch: Serial.println(F("Cannot Find File")); break; case Advertise: Serial.println(F("In Advertise")); break; default: break; } break; default: break; } } void serialEvent() { while (Serial.available()) { // get the new byte: char inChar = (char)Serial.read(); // add it to the inputString: inputString += inChar; // if the incoming character is a newline, set a flag so the main loop can // do something about it: if (inChar == '\n') { stringComplete = true; } } } void execute_CMD(byte CMD, byte Par1, byte Par2) // Excecute the command and parameters { // Calculate the checksum (2 bytes) word checksum = -(Version_Byte + Command_Length + CMD + Acknowledge + Par1 + Par2); // Build the command line byte Command_line[10] = { Start_Byte, Version_Byte, Command_Length, CMD, Acknowledge, Par1, Par2, highByte(checksum), lowByte(checksum), End_Byte }; //Send the command line to the module for (byte k = 0; k < 10; k++) { mySoftwareSerial.write( Command_line[k]); } } 5 1 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted October 29, 2019 Author Share Posted October 29, 2019 That code is a series of terrible compromises. 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.