<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-cn">
		<id>http://wiki.ywrobot.net/index.php?action=history&amp;feed=atom&amp;title=Arduino.h</id>
		<title>Arduino.h - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.ywrobot.net/index.php?action=history&amp;feed=atom&amp;title=Arduino.h"/>
		<link rel="alternate" type="text/html" href="http://wiki.ywrobot.net/index.php?title=Arduino.h&amp;action=history"/>
		<updated>2026-05-14T11:01:33Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://wiki.ywrobot.net/index.php?title=Arduino.h&amp;diff=55&amp;oldid=prev</id>
		<title>YWrobot WM：创建页面，内容为“&lt;pre style=&quot;color:blue&quot;&gt; #ifndef Arduino_h #define Arduino_h  #include &lt;stdlib.h&gt; #include &lt;string.h&gt; #include &lt;math.h&gt;  #include &lt;avr/pgmspace.h&gt; #include &lt;avr/io.h...”</title>
		<link rel="alternate" type="text/html" href="http://wiki.ywrobot.net/index.php?title=Arduino.h&amp;diff=55&amp;oldid=prev"/>
				<updated>2016-04-25T01:59:36Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt; #ifndef Arduino_h #define Arduino_h  #include &amp;lt;stdlib.h&amp;gt; #include &amp;lt;string.h&amp;gt; #include &amp;lt;math.h&amp;gt;  #include &amp;lt;avr/pgmspace.h&amp;gt; #include &amp;lt;avr/io.h...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
#ifndef Arduino_h&lt;br /&gt;
#define Arduino_h&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;avr/pgmspace.h&amp;gt;&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt;&lt;br /&gt;
#include &amp;lt;avr/interrupt.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;binary.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
extern &amp;quot;C&amp;quot;{&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#define HIGH 0x1&lt;br /&gt;
#define LOW  0x0&lt;br /&gt;
&lt;br /&gt;
#define INPUT 0x0&lt;br /&gt;
#define OUTPUT 0x1&lt;br /&gt;
#define INPUT_PULLUP 0x2&lt;br /&gt;
&lt;br /&gt;
#define true 0x1&lt;br /&gt;
#define false 0x0&lt;br /&gt;
&lt;br /&gt;
#define PI 3.1415926535897932384626433832795&lt;br /&gt;
#define HALF_PI 1.5707963267948966192313216916398&lt;br /&gt;
#define TWO_PI 6.283185307179586476925286766559&lt;br /&gt;
#define DEG_TO_RAD 0.017453292519943295769236907684886&lt;br /&gt;
#define RAD_TO_DEG 57.295779513082320876798154814105&lt;br /&gt;
&lt;br /&gt;
#define SERIAL  0x0&lt;br /&gt;
#define DISPLAY 0x1&lt;br /&gt;
&lt;br /&gt;
#define LSBFIRST 0&lt;br /&gt;
#define MSBFIRST 1&lt;br /&gt;
&lt;br /&gt;
#define CHANGE 1&lt;br /&gt;
#define FALLING 2&lt;br /&gt;
#define RISING 3&lt;br /&gt;
&lt;br /&gt;
#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)&lt;br /&gt;
#define DEFAULT 0&lt;br /&gt;
#define EXTERNAL 1&lt;br /&gt;
#define INTERNAL 2&lt;br /&gt;
#else  &lt;br /&gt;
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)&lt;br /&gt;
#define INTERNAL1V1 2&lt;br /&gt;
#define INTERNAL2V56 3&lt;br /&gt;
#else&lt;br /&gt;
#define INTERNAL 3&lt;br /&gt;
#endif&lt;br /&gt;
#define DEFAULT 1&lt;br /&gt;
#define EXTERNAL 0&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
// undefine stdlib's abs if encountered&lt;br /&gt;
#ifdef abs&lt;br /&gt;
#undef abs&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#define min(a,b) ((a)&amp;lt;(b)?(a):(b))&lt;br /&gt;
#define max(a,b) ((a)&amp;gt;(b)?(a):(b))&lt;br /&gt;
#define abs(x) ((x)&amp;gt;0?(x):-(x))&lt;br /&gt;
#define constrain(amt,low,high) ((amt)&amp;lt;(low)?(low):((amt)&amp;gt;(high)?(high):(amt)))&lt;br /&gt;
#define round(x)     ((x)&amp;gt;=0?(long)((x)+0.5):(long)((x)-0.5))&lt;br /&gt;
#define radians(deg) ((deg)*DEG_TO_RAD)&lt;br /&gt;
#define degrees(rad) ((rad)*RAD_TO_DEG)&lt;br /&gt;
#define sq(x) ((x)*(x))&lt;br /&gt;
&lt;br /&gt;
#define interrupts() sei()&lt;br /&gt;
#define noInterrupts() cli()&lt;br /&gt;
&lt;br /&gt;
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )&lt;br /&gt;
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )&lt;br /&gt;
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )&lt;br /&gt;
&lt;br /&gt;
#define lowByte(w) ((uint8_t) ((w) &amp;amp; 0xff))&lt;br /&gt;
#define highByte(w) ((uint8_t) ((w) &amp;gt;&amp;gt; 8))&lt;br /&gt;
&lt;br /&gt;
#define bitRead(value, bit) (((value) &amp;gt;&amp;gt; (bit)) &amp;amp; 0x01)&lt;br /&gt;
#define bitSet(value, bit) ((value) |= (1UL &amp;lt;&amp;lt; (bit)))&lt;br /&gt;
#define bitClear(value, bit) ((value) &amp;amp;= ~(1UL &amp;lt;&amp;lt; (bit)))&lt;br /&gt;
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
typedef unsigned int word;&lt;br /&gt;
&lt;br /&gt;
#define bit(b) (1UL &amp;lt;&amp;lt; (b))&lt;br /&gt;
&lt;br /&gt;
typedef uint8_t boolean;&lt;br /&gt;
typedef uint8_t byte;&lt;br /&gt;
&lt;br /&gt;
void init(void);&lt;br /&gt;
&lt;br /&gt;
void pinMode(uint8_t, uint8_t);&lt;br /&gt;
void digitalWrite(uint8_t, uint8_t);&lt;br /&gt;
int digitalRead(uint8_t);&lt;br /&gt;
int analogRead(uint8_t);&lt;br /&gt;
void analogReference(uint8_t mode);&lt;br /&gt;
void analogWrite(uint8_t, int);&lt;br /&gt;
&lt;br /&gt;
unsigned long millis(void);&lt;br /&gt;
unsigned long micros(void);&lt;br /&gt;
void delay(unsigned long);&lt;br /&gt;
void delayMicroseconds(unsigned int us);&lt;br /&gt;
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);&lt;br /&gt;
&lt;br /&gt;
void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);&lt;br /&gt;
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder);&lt;br /&gt;
&lt;br /&gt;
void attachInterrupt(uint8_t, void (*)(void), int mode);&lt;br /&gt;
void detachInterrupt(uint8_t);&lt;br /&gt;
&lt;br /&gt;
void setup(void);&lt;br /&gt;
void loop(void);&lt;br /&gt;
&lt;br /&gt;
// Get the bit location within the hardware port of the given virtual pin.&lt;br /&gt;
// This comes from the pins_*.c file for the active board configuration.&lt;br /&gt;
&lt;br /&gt;
#define analogInPinToBit(P) (P)&lt;br /&gt;
&lt;br /&gt;
// On the ATmega1280, the addresses of some of the port registers are&lt;br /&gt;
// greater than 255, so we can't store them in uint8_t's.&lt;br /&gt;
extern const uint16_t PROGMEM port_to_mode_PGM[];&lt;br /&gt;
extern const uint16_t PROGMEM port_to_input_PGM[];&lt;br /&gt;
extern const uint16_t PROGMEM port_to_output_PGM[];&lt;br /&gt;
&lt;br /&gt;
extern const uint8_t PROGMEM digital_pin_to_port_PGM[];&lt;br /&gt;
// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[];&lt;br /&gt;
extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];&lt;br /&gt;
extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];&lt;br /&gt;
&lt;br /&gt;
// Get the bit location within the hardware port of the given virtual pin.&lt;br /&gt;
// This comes from the pins_*.c file for the active board configuration.&lt;br /&gt;
// &lt;br /&gt;
// These perform slightly better as macros compared to inline functions&lt;br /&gt;
//&lt;br /&gt;
#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) )&lt;br /&gt;
#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )&lt;br /&gt;
#define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )&lt;br /&gt;
#define analogInPinToBit(P) (P)&lt;br /&gt;
#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) )&lt;br /&gt;
#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) )&lt;br /&gt;
#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) )&lt;br /&gt;
&lt;br /&gt;
#define NOT_A_PIN 0&lt;br /&gt;
#define NOT_A_PORT 0&lt;br /&gt;
&lt;br /&gt;
#ifdef ARDUINO_MAIN&lt;br /&gt;
#define PA 1&lt;br /&gt;
#define PB 2&lt;br /&gt;
#define PC 3&lt;br /&gt;
#define PD 4&lt;br /&gt;
#define PE 5&lt;br /&gt;
#define PF 6&lt;br /&gt;
#define PG 7&lt;br /&gt;
#define PH 8&lt;br /&gt;
#define PJ 10&lt;br /&gt;
#define PK 11&lt;br /&gt;
#define PL 12&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#define NOT_ON_TIMER 0&lt;br /&gt;
#define TIMER0A 1&lt;br /&gt;
#define TIMER0B 2&lt;br /&gt;
#define TIMER1A 3&lt;br /&gt;
#define TIMER1B 4&lt;br /&gt;
#define TIMER2  5&lt;br /&gt;
#define TIMER2A 6&lt;br /&gt;
#define TIMER2B 7&lt;br /&gt;
&lt;br /&gt;
#define TIMER3A 8&lt;br /&gt;
#define TIMER3B 9&lt;br /&gt;
#define TIMER3C 10&lt;br /&gt;
#define TIMER4A 11&lt;br /&gt;
#define TIMER4B 12&lt;br /&gt;
#define TIMER4C 13&lt;br /&gt;
#define TIMER4D 14	&lt;br /&gt;
#define TIMER5A 15&lt;br /&gt;
#define TIMER5B 16&lt;br /&gt;
#define TIMER5C 17&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
} // extern &amp;quot;C&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
#include &amp;quot;WCharacter.h&amp;quot;&lt;br /&gt;
#include &amp;quot;WString.h&amp;quot;&lt;br /&gt;
#include &amp;quot;HardwareSerial.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
uint16_t makeWord(uint16_t w);&lt;br /&gt;
uint16_t makeWord(byte h, byte l);&lt;br /&gt;
&lt;br /&gt;
#define word(...) makeWord(__VA_ARGS__)&lt;br /&gt;
&lt;br /&gt;
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);&lt;br /&gt;
&lt;br /&gt;
void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0);&lt;br /&gt;
void noTone(uint8_t _pin);&lt;br /&gt;
&lt;br /&gt;
// WMath prototypes&lt;br /&gt;
long random(long);&lt;br /&gt;
long random(long, long);&lt;br /&gt;
void randomSeed(unsigned int);&lt;br /&gt;
long map(long, long, long, long, long);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;pins_arduino.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>YWrobot WM</name></author>	</entry>

	</feed>