Skip to main content
Arduino

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
4
  • 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. Commented Apr 15, 2017 at 14:17
  • 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. Commented Apr 15, 2017 at 15:08
  • 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? Commented Apr 15, 2017 at 16:33
  • 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. Commented Apr 15, 2017 at 17:32

default

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