online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
import datetime from suntime import Sun, SunTimeException #This is a custom library, for more information, https://github.com/SatAgro/suntime import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BOARD) GPIO.setup(3, GPIO.OUT) latitude = 24.68773 #Change to your latitude (obtained from google maps) longitude = 46.72185 #Change to your longitude (obtained from google maps) while 1: sun = Sun(latitude, longitude) ss = sun.get_sunset_time() + datetime.timedelta(hours=3) #3 hours to leap from UTC to UTC+3, change to your local timezone now = datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(hours=3) #3 hours to leap from UTC to UTC+3, change to your local timezone diff = ss - now seconds = diff.total_seconds() minutes = seconds / 60 hours = minutes / 60 print(seconds) #used for debug if (-2 < seconds <= 2): GPIO.output(3, 1) sleep(60) #You can change this value to control duration of lantern's light time else: GPIO.output(3,0) sleep(1) GPIO.cleanup()

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue