Skip to content

Latest commit

 

History

History
149 lines (142 loc) · 16.2 KB

README.md

File metadata and controls

149 lines (142 loc) · 16.2 KB

Arduino snippets for VS Code

This extension for Visual Studio Code adds snippets for Arduino.
Adds arduino snippets for both *.ino files and cpp language. So, if you didn't install Microsoft's Arduino extension, the snippets would still work.

Use Extension

Usage

Type part of a snippet, press enter, and the snippet unfolds.

Snippets

Snippet Purpose
Advanced I/O
noTone noTone()
pulseIn pulseIn()
pulseInLong pulseInLong()
shiftIn shiftIn()
shiftOut shiftOut()
tone tone()
Analog I/O
analogRead analogRead
analogReference analogReference
analogWrite analogWrite
Bits and Bytes
bit bit()
bitClear bitClear()
bitRead bitRead()
bitSet bitSet()
bitWrite bitWrite()
highByte highByte()
lowByte lowByte()
Characters
isAlpha isAlpha()
isAlphaNumeric isAlphaNumeric()
isAscii isAscii()
isControl isControl()
isDigit isDigit()
isGraph isGraph()
isHexadecimalDigit isHexadecimalDigit()
isLowerCase isLowerCase()
isPrintable isPrintable()
isPunct isPunct()
isSpace isSpace()
isUpperCase isUpperCase()
isWhitespace isWhitespace()
Communication
savailable Serial.available()
sbegin Serial.begin()
send Serial.end()
sevent serialEvent()
sfind Serial.find()
sfindUntil Serial.findUntil()
sflush Serial.flush()
spfloat Serial.parseFloat()
spint Serial.parseInt()
speek Serial.peek()
sprint Serial.print()
sprint Serial.println()
sread Serial.read()
sreadBytes Serial.readBytes()
sreadBytesUntil Serial.readBytesUntil()
stimeout Serial.setTimeout()
swrite Serial.write()
Data Types
byte byte()
char char()
float float()
ifdef Macro ifdef
ifndef Macro ifndef
int int()
long long()
elif Macro elif
sizeof sizeof()
undef Macro undef
Digital I/O
digitalRead digitalRead
digitalWrite digitalWrite
pinMode pinMode
External Interrupts
attachInterrupt attachInterrupt()
detachInterrupt detachInterrupt()
Interrupts
interrupts interrupts()
noInterrupts noInterrupts()
Math
abs abs()
constrain constrain()
map map()
max max()
min min()
pow pow()
sq sq()
sqrt sqrt()
Random Numbers
random random()
randomSeed randomSeed()
Resolution
areadresolution analogReadResolution()
awriteresolution analogWriteResolution()
String Fucionts
c_str c_str()
charAt charAt()
compareTo compareTo()
concat concat()
endsWith endsWith()
equals equals()
equalsIgnoreCase equalsIgnoreCase()
getBytes getBytes()
indexOf indexOf()
lastIndexOf lastIndexOf()
length length()
remove remove()
replace replace()
reserve reserve()
setCharAt setCharAt()
startsWith startsWith()
substring substring()
toCharArray toCharArray()
toFloat toFloat()
toInt toInt()
toLowerCase toLowerCase()
toUpperCase toUpperCase()
trim trim()
Structure
arduino skelet
class skelet
define Macro define
dowhile do-while
if Macro if
include include syslib
for for
loop loop
setup setup
struct skelet
switch switch
while while
Time
delay delay()
delayMicroseconds delayMicroseconds()
micros micros()
millis millis()
Trigonometry
cos cos()
sin sin()
tan tan()