expected unqualified-id before 'void'

i m facing a problem to implement this code.
i m attaching a file

in this error shows like this
sketch_aug26b:52:1: error: expected unqualified-id before ‘void’

void setup() {

^

sketch_aug26b:49:16: error: expected constructor, destructor, or type conversion before ‘;’ token

timedRead(void);

^

exit status 1
expected unqualified-id before ‘void’
please help me out,what should i do

webtwit.ino (11.8 KB)

#include <ESP8266WiFi.h>

This code indicates you are directly programming an ESP8266 board. Is that correct?

#include <WiFi.h>

This will cause the standard Arduino WiFi library to be compiled. That library is for the official Arduino WiFi Shield. It’s extremely unlikely that you have an Arduino WiFi Shield connected to an ESP8266.

If I remove that pointless line from your code it compiles fine for me.

yes,i m using wemos d1 r1,because i don't have arduino wifi shield.so can u correct me.please

i have remove that wifi.h ,but still getting the same error

please share me ur mail id,so that i can easily ask u question

zara3107:
i have remove that wifi.h ,but still getting the same error

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.

zara3107:
please share me ur mail id,so that i can easily ask u question

We prefer to help people publicly here on the forum because this way the information shared is available to everyone. There are millions of Arduino users and we don’t have time to help each one individually. The hope is that when I help someone in a public forum thread, that information will help many others with the same question in the years to come as they find that forum thread in a Google search. In this way, the effort of one person is magnified many times through the magic of sharing information freely on the Internet.

i want to do this twitter hashtag passing content mood controller lamp.
here i shown the link.

https://www.arduino.cc/en/Tutorial/Twitter-controlledMoodLamp

but this code is implemented using wifi shield a000058,but i have wemos d1 r1 controller.
when i done this same program by some manipulation it’s give error
like this

Arduino: 1.8.7 (Windows 10), Board: “WeMos D1 R1, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600”

webtwit:52:1: error: expected unqualified-id before ‘void’

void setup() {

^

webtwit:49:16: error: expected constructor, destructor, or type conversion before ‘;’ token

timedRead(void);

^

exit status 1
expected unqualified-id before ‘void’

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

i have attached the manipulated code,
how can i debug it.
i have only wemos now.
so please tell me preferable solution that can work.what mistake i have done in code?

webtwit.ino (11.8 KB)

You're using an outdated version of the Arduino IDE that had a bug in its automated function prototype generation system. Please update to Arduino IDE 1.8.9 to fix the error:

thanks for the suggestion,i will work now,code compile and run properly,but here is one problem occur…
i want from a code
“i tweet from my twitter as #ArduinoRGB (by some number) and it can shown in my Com port with details of username ,msg,time”
But when i tweet #ArduinoRGB 24 then not anything shown on the comport for twitter detail,only showing awating result.
Here i shown the screeshot of my output.
what should i do now.in which section i do manipulate?
please help me out

zara3107:
But when i tweet #ArduinoRGB 24 then not anything shown on the comport for twitter detail,only showing awating result.
Here i shown the screeshot of my output.

@zara3107's tweet.PNG:

Are you sure of that? Your screenshot shows you have autoscroll disabled and the scroll bar on the right edge of the Serial Monitor window indicates there is a lot more text in Serial Monitor. Please scroll the window down to see the rest of the text.

yes sir,i have unclick that autoscroll because to take a screenshot,everything like the same that i have given u screenshot,always "awaiting results" and repeated that four lines only,what should i do now.
if u have any link or code that compatlie with my wemos board and that function perform like this

"i tweet from any twitter as #ArduinoRGB (by some number) and it can shown in my Com port with details of username ,msg,time"
then please share with me

timedRead(void);

should be:

timedRead();

pert sir please reply possible solution for this code