Closed rradar closed 5 years ago
I think I found the important diffrence between a pure ATTiny85 and the digispark.
So the question: Is it possible to shrink the code by 8% (=502 bytes) to fit into the digispark? Maybe a lite version... even though I have no idea were to save space :confused:
Hi radar, there are INA219 and SSD1306 exist before I made this project. I cannot use those library because it cannot fit in 8 KB storage. My tailor-made libraries already squeeze much in size. I think there are still 2 places you may try:
Font.h, it contains characters from ASCII code 32 to 126, you may trim some not used in this project.
Rewrite all floating point variables to integer, according to Arduino web site, it can save 2KB in size: http://www.arduino.cc/en/Guide/Troubleshooting#size
Hi @moononournation
thank's for your feedback! Meanwhile I had success to shrink my boot loader (see this instructable for more) of the digispark to have unbelievable usable space for program code of 6714 bytes! :smiley:
Right now I have only problems to flash any program code via arduino on my digispark. But I will get over it hopefully! https://github.com/micronucleus/micronucleus/issues/130 previously and now https://github.com/micronucleus/micronucleus/issues/131
It is a good news to heard that the reset pin still work to flash latest micronucleus!
It works @moononournation !
Thank's a lot! I made it :smiley:
As per your screen output, you may still using the outdated TinyWireM library bundle with DigiSpark. You can download the bug fixed version at Arduino Library Manager.
@moononournation thank's for your feedback! How can you see it? Is it the spots on the right side in the screen? My screen actually has one dead line you can see in the mWh...
Does it just help to download the TinyWireM library in arduino and than compile the sketch again? Or is it necessary to do more steps like changing the code?
yes, download, compile and upload
Hello @moononournation sorry to bother. I stumbled upon your instructables yesterday and were very impressed by your work. I anted to start right away with this project. I don't have attiny85 but a digispark which is driven by a tiny85.
I have the first one in this picture:
I tried to compile your sketch with the arduino IDE 1.8.6 but get the following error message:
Is there anything I can do about it? I would really like to have this DIY Power Meter :cry: