- www.exploreembedded.com
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
#include"adc.h" | |
#include"delay.h" | |
/*************************************************************************************************** |
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
#include "glcd.h" //User defined LCD library which conatins the lcd routines | |
/* start the main program */ | |
void main() | |
{ | |
GLCD_Init(); | |
GLCD_Printf("Hello World!"); | |
GLCD_GoToLine(4); | |
GLCD_Printf("*&^%$#@!~"); | |
GLCD_GoToLine(7); | |
GLCD_DisplayString("Well this is the end!"); |
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
#include "adc.h" | |
#include "uart.h" | |
int main() | |
{ | |
int adcValue; | |
float volt; | |
ADC_Init(); /* Initialize the ADC module */ | |
UART_Init(9600); /* Initialize UART at 9600 baud rate */ | |
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
#include "adc.h" | |
#include "uart.h" | |
int main() | |
{ | |
int adcValue; | |
int temp; | |
ADC_Init(); /* Initialize the ADC module */ | |
UART_Init(9600); /* Initialize UART at 9600 baud rate */ |
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
#include "rtc.h" | |
#include "lcd.h" | |
int main() | |
{ | |
rtc_t rtc; | |
/*Connect RS->PB0, RW->PB1, EN->PB2 and data bus to PORTB.4 to PORTB.7*/ | |
LCD_SetUp(PB_0,PB_1,PB_2,P_NC,P_NC,P_NC,P_NC,PB_4,PB_5,PB_6,PB_7); | |
LCD_Init(2,16); |
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
/* | |
* GLCDexample | |
* | |
* Basic test code for the Arduino KS0108 GLCD library. | |
* This code exercises a range of graphic functions supported | |
* by the library and is an example of its use. | |
* It also gives an indication of performance, showing the | |
* number of frames drawn per second. | |
*/ |
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
#include "ST7565.h" | |
// the LCD backlight is connected up to a pin so you can turn it on & off | |
#define BACKLIGHT_LED 10 | |
// pin 29 - Serial data out (SID) | |
// pin 28 - Serial clock out (SCLK) | |
// pin 27 - Data/Command select (RS or A0) | |
// pin 26 - LCD reset (RST) | |
// pin 25 - LCD chip select (CS) | |
ST7565 glcd(29, 28, 27, 26, 25); |
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
#include <TinyGPS++.h> | |
//We are using HW serial port on Explore M3 hence commented out | |
//#include <SoftwareSerial.h> | |
/* | |
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object. | |
It requires the use of SoftwareSerial, and assumes that you have a | |
9600-baud serial GPS device hooked up on pins 4(rx) and 3(tx). | |
Explore M3 note: The soft serial object ss is replaced with Serial0 | |
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
#include <SPI.h> | |
#include <MFRC522.h> | |
#define RST_PIN 5 // Configurable, see typical pin layout above | |
#define SS_PIN 13 // Configurable, see typical pin layout above | |
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance | |
void setup() { | |
// delay(5000); |
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
/* | |
ADXL3xx | |
Reference: | |
http://www.arduino.cc/en/Tutorial/ADXL3xx | |
The circuit: | |
analog 0: accelerometer self test | |
analog 1: z-axis |
OlderNewer