Skip to content

Instantly share code, notes, and snippets.

View monpetit's full-sized avatar
💭
I may be slow to respond.

YoungSik Won monpetit

💭
I may be slow to respond.
View GitHub Profile
#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"
#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
#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 <avr/io.h>
#include <util/delay.h>
#include <avr/wdt.h>
#include <avr/sleep.h>
#include <avr/power.h>
ISR(WDT_vect)
{
}
#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"
/*
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
#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"
/*
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,
#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>
#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()
{