Tell us about yourself!
- PeterH293 commented on DIY KING 00's instructable DIY Wind Turbine Using Car Alternator
- PeterH293 commented on bart.blankendaal's instructable The Different Useless MachineView Instructable »
Thank you. I agree it's a matter of style. My approach is to use local variables rather than global, wherever possible, but you have certainly simplified the loop.
- PeterH293 commented on bart.blankendaal's instructable The Different Useless MachineView Instructable »
No, you are quite right. It was myself that was missing something (sorry, but bear in mind that I'm not in the position of having built the machine). It occurred to me in bed last night what was going to go wrong. Here is the amended code;void loop(){buttonAstatus = digitalRead(buttonApin);if (buttonAstatus != previous) // switch has changed{delay(1100);int whichWay = STEPS;if (previous == HIGH) whichWay = -whichWay;myStepper.step(whichWay);previous = buttonAstatus; // reset statusdigitalWrite(8, LOW); //for less power consumptiondigitalWrite(9, LOW);digitalWrite(10, LOW);digitalWrite(11, LOW);}}
- PeterH293 commented on bart.blankendaal's instructable The Different Useless MachineView Instructable »
You have used a two-way switch where a simple on-off switch would do. In your sketch forget about buttonBpin: either the switch is at position A and that input pin is LOW or the switch is the other way and the input is HIGH. #include <Stepper.h>#define STEPS 2000Stepper myStepper(STEPS, 8, 9, 10, 11);int buttonApin = 4;bool buttonAstatus = LOW; // good programming practicebool previous = LOW; // to initialise variables on declarationvoid setup(){ myStepper.setSpeed(500); pinMode(buttonApin, INPUT_PULLUP);buttonAstatus = previous = digitalRead(buttonApin); }void loop(){ buttonAstatus = digitalRead(buttonApin);if (buttonAstatus != previous) // switch has changed { delay(1100); myStepper.step(STEPS);previous = buttonAstatus; // reset status digitalWrite(8, LOW)…
see more » - PeterH293 commented on YADUKRISHNAN K M's instructable Simple TELESCOPEView Instructable »
Well done! But I don't know how you managed to find such large objective lenses.
- PeterH293 commented on stuarthayden10's instructable Replace a Cat5e ConnectorView Instructable »
It's good, but if the connector has a sheath then Step 1a is to slide the sheath onto the cable before embarking on Step 2
- PeterH293 commented on tdonoclift's instructable Tiny Oak Ring LampView Instructable »
The design is very pretty. If I were making it up from scratch, though, I would start with a 40mm chunk, say a cross-section of a branch. The boring of the hole for the lamp mount from underneath would be the first stage, followed by cutting out the space for the wiring connectors. That access space could later be closed off by a small plate which would be invisible when the lamp is stood on the table. The wires would still come out through a hole drilled in the back. The final stage of construction would be cutting the large hole around the bulb. The main virtue of this scheme is that everything remains accessible and repairable.
- PeterH293 commented on wilgubeast's instructable 9 Unusual Uses for AspirinView Instructable »
There's another important use for aspirin - as a contraceptive. Just tell the girl to hold the aspirin pill between her knees.
- PeterH293 commented on electronics for everyone's instructable Emergency Keyring Phone Charger
With blades that long your turbine should be whizzing round.l think your problem is in the design of the blades, which need a high angle of attack at the root and a smaller angle of attack at the tip. Your tip angles look to be almost flat.