How to Use a Screen to Display CPU Temp (not thermistor)?

Belial88:
Hm, 1023 not 1024. I also copied a part a second time but that setcursor somewhere else so i dont know if that wouldve stopped it all from working. you also remove byte rxbytw and byte temp (dont know those). you put the lcd brightness settings of 0-255 in setup instead of loop, that’s weird.

The 1023 is the correct number, though I doubt the difference is in anyway significant. The declarations for rxbyte and temp were moved to where other such variables are declared. I put the brightness controls in setup() as the weren't changing and so only need to run once. Remember that any code in the loop() will only run when the Smartie code is done processing a command or sending a character to the LCD. That's perhaps 40 - 80 times (in a burst) every refresh cycle (as set by the Smartie control GUI on the PC. That's because the Smartie code sits there polling the USB until data comes in and only then does all the code in the loop() run.

Belial88:
UART… could I use UART to communicate to the pc, instead of the usb? Because as it is, I will have to hack up the usb line, where d+/d- will go to my pc, and then red/black will go to the powergen usb battery charger pack. not a big deal, just curious. or do i need usb here?

anyways, im not sure i follow what you mean about varspeedservo disabling a pin from pwm. it disables the lcd from doing pwm? do you mean pin 5, not d5 from lcd? Why does it do this? The lcd data pins dont have to be pwm though right, so doesnt matter if its d5 or 5 that cant do pwm…but pin5 on the arduino is pwm.

You could use the UART, it would be more coding and you'd need a USB-serial converter as well.

From the VarSpeedServo library VarSpeedServo.cpp file ;

https://github.com/netlabtoolkit/VarSpe … dServo.cpp

Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached. Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.

For your Micro that’s timer3 that’s used and that seems to go only to the Arduino pin5 (labelled D5 on the schematic). So pin5 can’t do the analogWrite function.

Belial88:
But i cant get the lcd voltmeter part to work. it just isn’t there, with lcd smartie on or off (and smartie can write on those lines too).

How are you configuring Smartie to send the brightness on and off commands ?

Belial88:
dont understand this line

SWtime holds the time of the last valid switch push. Anytime the switch is pushed, **or bounces**, the ISR runs. If the time difference btw any 2 pushes is less that 2 secs, the later is considered a bounce, not a push and so the door command remains unchanged.