Created
August 2, 2017 20:15
-
-
Save fsmunoz/5865663537966937540a8090b675bcc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Blink the internal LED of an Arduino (and others) using AVR-Ada | |
-- | |
-- Code by Tero Koskinen | |
-- http://arduino.ada-language.com/blinking-led.html | |
with AVR; | |
with AVR.MCU; | |
with AVR.Real_Time.Delays; | |
use AVR; | |
procedure Blink is | |
Led_On : Boolean := False; | |
LED_PIN : constant := 5; | |
begin | |
MCU.DDRB_Bits (LED_PIN) := DD_Output; | |
loop | |
Led_On := not Led_On; | |
MCU.PORTB_Bits (LED_PIN) := Led_On; | |
delay 8.0; | |
end loop; | |
end Blink; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment