Hello,
I have a problem with using the input widget .
My hardware ist arduino mega
Iphone SE, newest IOS
When I use the sketch “update time input state on IU” it is not possible to work with integer variables like below in the sketch I become the following response :
/var/folders/g6/_qgcfz5n353c8qc0h1w4pgyh0000gp/T/arduino_modified_sketch_804163/UpdateTimeInputState.ino:58:30: warning: integer overflow in expression [-Woverflow]
*** unsigned long stopAt (60060); //01:05**
Whats wrong in the sketch ? Is it because Arduino mega has only a 8 Bit CPU ?
Add details :
• Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
• Smartphone OS (iOS or Android) + version
• Blynk server or local server
• Blynk Library version
• Add your sketch code. Code should be formatted as example below.
Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.
@alphakasi please edit your posts, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```
It’s much simpler, and tidier, if you EDIT your existing pists to fix the formatting, rather than simply re-posting your formatted code in another post.
I have deleted your unformatted code from your previous posts.
You seem to be missing an equals operator (=)
If you add that in like this I think it should work…
unsigned long stopAt = (600*60);
Some of your in-code comments are rather confusing, such as this:
If you want something to run automatically when Blynk connects then you should use the BLYNK_CONNECTED callback function. The BLYNK_WRITE(V46) callback will only be triggered when the value of the widget attached to V46 changes, or if you call Blynk.syncVirtual(V46) which is usually done from within BLYNK_CONNECTED
= 00:04 not 00:05
= 10:00 not 01:05
Also, you seem to be using the widget time input widget in reverse - pushing the values from the code rather than allowing the user to set them in the app.
If you google the error message it seems that the 600*60 calculation is being treated as an integer during the intermediate calculation, as you’re multiplying two integers together.