rocketscream / TinyReflowController

An all-in-one Arduino compatible reflow controller powered by ATtiny1634R
121 stars 64 forks source link

A referencing issue? #13

Open RyanJBeagles opened 3 years ago

RyanJBeagles commented 3 years ago

Hi, I just finished my oven build and ran a few tests. I decided to change some of the PID settings on the device, but when I tried to upload the code the screen would not turn on. Very long story short, I hacked my way into finding that the OLED hangs on the line timerSoak = millis() + soakMicroPeriod; inside both the case REFLOW_STATE_PREHEAT and the case REFLOW_STATE_SOAK. I decided to replace the soakMicroPeriod variable with the hard 9000 value for leadfree (what I am using currently) and the screen now turns on, although I haven't tested it in the oven yet. I don't think the millis is hanging the system like other posts are saying, but there might be some referencing issue going on. In addition the oled now has an area which is constantly pixiliating at the bottom right corner of the screen.

rocketscream commented 3 years ago

If you are using V2 of the PID library, it will overrun the amount of RAM on the ATMega328P, hence it stop at the screen routine. Please use V1 of the PID library.

RyanJBeagles commented 3 years ago

Hi, I double checked and I am using the V1.2 PID library linked in the .ino. Update: I reverted from V1.2 to V1.1 but still have a blank screen with the original code. Same changes as above have the same outcome.

RyanJBeagles commented 3 years ago

Another update: you were correct, it was the V1.2 library causing the issue. Despite setting the library to 1.1 in the manage libraries menu, the compiler still selected the newer library after it found 2 compatible libraries available. I deleted the 1.2 library out of the folder leaving the compiler only one choice and things seem to be working properly again.