cevaplar için herkese teşekkür ederim. İlk gönderi olduğu için uygun bir gönderi yoktu. Sonraki gönderilerime dikkat ediyorum. Saygılarımla
Show a wiring diagram.
-
If these are buttons, have you pullup or pulldown resistors to stop these floating:
pinMode(DN, INPUT) ;
. . .
if( digitalRead(DN)==1 ) . . . // probably pulldown resistor required. -
You are writing to the EEPROM in the loop(). You get only a limited number of write operations during the lifetime of an EEPROM.
-
Look at EEPROM.get() and .put(). You can write integers (or many other data types) directly without this:
NumStep1=EEPROM.read(address1 ) ;
NumStep2=EEPROM.read(address2 ) ;
NumStep=NumStep1+(NumStep2<<8 ) ;
4 in void timerIsr() use a switch statement or an if / else if / else construct to avoid unnecessary tests.
OK, first things first.
You need to go and read the forum instructions so that you can go back and modify your original post (not re-post it - using the "More -> Modify" option below the right hand corner of your post - to mark up your code as such using the "</>" icon in the posting window. Just highlight each section of code (or output if you later need to post that) from the IDE and click the icon.
In fact, the IDE itself has a "copy for forum" link to put these markings on a highlighted block for you so you then just paste it here in a posting window. But even before doing that, don't forget to use the "Auto-Format" (Ctrl-T) option first to make it easy to read. While you were lucky so far, If you do not post it as "code" it can easily be quite garbled and is always more difficult to read due to the font.
It is inappropriate to attach it as a ".ino" file unless it is clearly too long to include in the post proper. People can usually see the mistakes directly and do not want to have to actually load it in their own IDE. And even that would also assume they are using a PC and have the IDE running on that PC.
Also tidy up your blank space. Do use blank lines, but only single blanks between complete functional blocks.
Why do we think this is more important than just having your question answered? Because it is really difficult to write code properly - as with any other task requiring care - if everything is disorganised!
The duplicate topic with no replies has been deleted
Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.
Continued cross posting could result in a time out from the forum.
Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.