Skip to main content
Arduino

Timeline for Loop inside switch statement

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
May 16, 2017 at 1:23 history bumped Community Bot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apr 15, 2017 at 23:21 answer added dannyf timeline score: 1
Apr 15, 2017 at 21:33 answer added James Waldby - jwpat7 timeline score: 0
Apr 15, 2017 at 17:41 history edited Vishruth Kumar CC BY-SA 3.0
Added push button program
Apr 15, 2017 at 17:32 comment added Vishruth Kumar I am just trying to print the analog values (example from basic arduino). Here I am getting analog values and I am trying to print the same on OLED. Without voice module , I am able to get the LDR readings on OLED. Now after adding the voice command, my statement is isnide switch case followed by break. I am able to verify whether my voice command is recorded or not from serial monitor. The problem is with code. The display should run in a loop showing LDR values after half second. The code is the problem.
Apr 15, 2017 at 16:33 comment added James Waldby - jwpat7 For debugging, add a Serial.print() or and/or an OLED output (on a different line) that every half second or so tells the current sensor reading and the most-recent voice-unit output. Or temporarily add a button to simulate an On event. Do you know for sure that the sensor reading should change? Or does the OLED obviously blink each time a reading is put up? Do you know if an On event is occurring after the first On, or if it is a display issue?
Apr 15, 2017 at 15:52 history edited dda CC BY-SA 3.0
deleted 519 characters in body; edited title
Apr 15, 2017 at 15:18 history edited Vishruth Kumar CC BY-SA 3.0
Uploaded the entire code to explain the OLED library function which I did not include in the previous post
Apr 15, 2017 at 15:08 comment added Vishruth Kumar I mean to say that the OLED displays one LDR reading taken at the moment I say "on". And the display doesnt refresh to give continuous LDR reading . Eg : the OLED shows " LDR Reading :372" This will remain on the screen as it is until I say "off" which clears the display and make it blank. Then again when I say "on" , it displays another reading taken at the moment and it remains as it is on screen. I want the OLED to display continuous readings at an interval of 500 milli seconds and should clear the display once I say "off". I am uploading the full code.
Apr 15, 2017 at 14:17 comment added James Waldby - jwpat7 Does the "freezed in first reading" thing, whatever it might be, happen to last about 500 milliseconds? What does "freezed in first reading" mean, exactly? ¶ Note, "changed the above code only in the switch case" probably is false. Not showing a Minimal, Complete, and Verifiable example of code – eg, you don't show declarations of display, sensorValue, and sensorPin, and don't indicate nature of sensor or model of OLED – makes it difficult to diagnose problems.
Apr 15, 2017 at 12:10 history asked Vishruth Kumar CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /