AVR ERROR : local variable 'num_res' referenced before assignment
When i uploaded new code to deal with connecting error i get the error: local variable 'num_res' referenced before assignment
To recreate:
- load new code to Adruino Mega2560.
- Use AVR MINER 2.72
- and you will get the error : local variable 'num_res' referenced before assignment
see image of errors
Hello, generally these error appears when the arduino doesn't return the values to the AVR_miner, can you enable the debug with debug = y on the Miner_config.cfg file and send another print please
For some reason its not showing that error but another see pic:
Definitivaly this are estrange... I don't know if this it's a issue from the code or if this are a issue into your MEGA, because sometimes your mega give a wrong answer format and somethimes a correct answer format:
Note: these communications error can ocasionate the first issue too local variable 'num_res' referenced before assignment
Unfortunately I don't have a mega to be able to test this further... but this is definitely weird...
Try to reload the code to your arduino, and test again please
i have done it about 5 times still does the same thing my mega is the elegoo R3 Mega2560: https://www.amazon.com/ELEGOO-ATmega2560-ATMEGA16U2-Projects-Compliant/dp/B01H4ZLZLQ/ref=sr_1_4?dchild=1&keywords=elegoo+mega+2560&qid=1631142375&sr=8-4
https://m.media-amazon.com/images/I/71oqDmr3zKS.AC_SX679.jpg
seems like the avr_timeout is too short, avr_miner read half way and got cut off. can you try edit Miner.cfg to increase the timeout? avr_timeout = 10
After increasing timeout to 10 seconds its shows that 'num_res' error and other errors please see pic
its working fine now i increased timeout to 20 seconds its now working perfectly thanks for you help