This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <inttypes.h> | |
| #include "em_device.h" | |
| #include "em_chip.h" | |
| #include "em_usart.h" | |
| #include "em_cmu.h" | |
| #include "em_emu.h" | |
| #include "em_int.h" |
This file contains hidden or 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
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #include <avr/wdt.h> | |
| #include <avr/sleep.h> | |
| #include <avr/power.h> | |
| #include <avr/interrupt.h> | |
| // Routines to set and claer bits (used in the sleep code) | |
| #ifndef cbi |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <inttypes.h> | |
| #include "em_device.h" | |
| #include "em_chip.h" | |
| #include "em_usart.h" | |
| #include "em_cmu.h" | |
| #include "em_emu.h" |
This file contains hidden or 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
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #include <avr/wdt.h> | |
| #include <avr/sleep.h> | |
| #include <avr/power.h> | |
| ISR(WDT_vect) | |
| { | |
| } |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <inttypes.h> | |
| #include "em_device.h" | |
| #include "em_chip.h" | |
| #include "em_usart.h" | |
| #include "em_cmu.h" | |
| #include "em_emu.h" |
This file contains hidden or 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
| /* | |
| Copyright (c) 2016 Ergo Inventus Inc. | |
| Copyright (c) 2012-2014 RedBearLab | |
| Permission is hereby granted, free of charge, | |
| to any person obtaining a copy of this software | |
| and associated documentation files (the "Software"), | |
| to deal in the Software without restriction, | |
| including without limitation the rights |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <inttypes.h> | |
| #include "em_device.h" | |
| #include "em_chip.h" | |
| #include "em_usart.h" | |
| #include "em_cmu.h" | |
| #include "em_emu.h" | |
| #include "em_adc.h" |
This file contains hidden or 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
| /* | |
| Copyright (c) 2012-2014 RedBearLab | |
| Permission is hereby granted, free of charge, | |
| to any person obtaining a copy of this software | |
| and associated documentation files (the "Software"), | |
| to deal in the Software without restriction, | |
| including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, |
This file contains hidden or 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
| #include "em_system.h" | |
| #include "em_emu.h" | |
| #include "em_cmu.h" | |
| #include "em_device.h" | |
| #include "em_chip.h" | |
| #include "em_gpio.h" | |
| #include <stdlib.h> | |
| #include <stdint.h> |
This file contains hidden or 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
| #include <Stepper.h> | |
| const int steps = 600; | |
| // initialize the stepper library on pins 8 through 11: | |
| Stepper motor(steps, 8, 9, 10, 11); | |
| void setup() | |
| { |