how to run dc motor using keypad?

This is my code, i can't read the keypad input and turn it into pwm value ranging 0-255 #include const byte numRows= 4; //number of rows on the keypad const byte numCols= 3; //number of columns on the keypad //keymap defines the key pressed according to the row and columns just as appears on the keypad char keymap[numRows][numCols]= { {'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}, {'*', '0', '#'} }; //Code that shows the the keypad connections to the arduino terminals byte rowPins[numRows] = {8,7,6,5}; //Rows 0 to 3 byte colPins[numCols]= {4,3,2}; //Columns 0 to 3 //initializes an instance of the Keypad class Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols); char Data[5]; int motorpin = 9; int speed=0; int currentCommand = 0; int keyIn; long NewData=0; void setup() { Serial.begin(9600); } void loop() { char keypressed = myKeypad.getKey(); if (keypressed != NO_KEY) {   Data[currentCommand++]=keypressed;   NewData= constrain (speed,0,255);   keyIn = atoi(Data); } else {   Serial.println(keyIn);   analogWrite(motorpin,keyIn);   while(currentCommand !=0) {     Data[currentCommand--]=0;   } } } //With this code, once we press a key on the keypad, it should show up on the serial monitor of the arduino software once the code is compiled and uploaded to the arduino board.

Question by AndrahyzertekosterA 2 years ago  |  last reply 2 years ago


Giant Spider WALKS in Liverpool - update

In May 2006 something incredible happened in London. For four days the city stopped in its tracks and marvelled at the sight of a gigantic wooden elephant, and a little-girl giant in a green dress. Hundreds of thousands of people jammed the streets, astonished at the scale and beauty of the spectacular Sultan's Elephant.Now Artichoke, the company that brought that event to London, is working with the engineering genius behind Royal de Luxe's giants, François Delarozière, and his company La Machine, to create a magical and astonishing new show especially for Liverpool, European Capital of Culture 2008. Liverpool08Something unforgettable is happening in Liverpool as a highlight of the city’s European Capital of Culture celebrations. Vast in scale and spectacular in execution, this breathtaking new commission from La Machine will spin a tale so magical that an entire city will fall under its spell. Just as The Sultan’s Elephant stopped London in its tracks in 2006, so this three-day adventure will unfold against the landmarks of a great city, stopping the traffic and captivating everyone who sees it. Prepare to be amazed by a show that will make you believe in the impossible.A gigantic mechanical spider has appeared in Liverpool, clinging to the side of a derelict building next to Lime Street station. A group of scientific researchers have arrived and are investigating… What will the next chapter of the story bring?La MachineUPDATEThousands of people braved the rain to watch a 50ft (15m) high mechanical spider come to life in Liverpool.About 5,000 people watched La Princesse come out of "hibernation" outside the city's arena at King's Dock on Friday.An estimated 20,000 more were in the city on Friday evening to see her crawl down The Strand before heading for a resting place at the Cunard building.The £1.5m street theatre production, operated by French company La Machine, is a Capital of Culture event.La Princesse was unveiled to the public on Wednesday morning, hanging from a redundant office block next to Lime Street railway station.She was woken in a hail of fireworks and smoke at 1130 BST on Friday, before striding up and down in front of the arena in front of the cheering crowd. Story and videoThe spider is moved to the performance area (watch the lorry sequence - you can see that each leg has a separate set of controls)The full ballet:

Topic by Kiteman 10 years ago  |  last reply 8 years ago


Call for makers/stall-holders : stall spaces available at Maker Fayre in Liverpool (UK)

Stall spaces available for all makers who would like to sell their wares at a fabulous event at Heebie Jeebies, in Liverpool (UK), evening of August 31st. The event is geared towards a theme of Steampunk, Industrial Revolution, and mad science, but makers of all varieties welcome. To book a place, or for further details, please PM me. Thanks!

Topic by Duckatr0n 7 years ago  |  last reply 7 years ago


Call for makers/stall-holders : stall spaces available at Maker Fayre in Liverpool (UK)

Stall spaces available for all makers who would like to sell their wares at a fabulous event at Heebie Jeebies, in Liverpool (UK), evening of August 31st. The event is geared towards a theme of Steampunk, Industrial Revolution, and mad science, but makers of all varieties welcome. To book a place, or for further details, please PM me. Thanks!

Topic by Duckatr0n 7 years ago  |  last reply 7 years ago


London 'Iblers meetup with Eric!

Eric Wilhelm is in London this week. We thought we'd capitalise (a ha ha) on this and, in fine British tradition, go to the pub.  All members are welcome- the destination is the Mug House, London Bridge on Friday 10th of January.  Kiteman and I will be at Liverpool St. station at around 7:00pm, or you can meet us at the pub.  Hope to see you there and put some faces to names!

Topic by PKM 5 years ago  |  last reply 5 years ago