Skip to content

OwenFlood/arduino-snippets

 
 

Repository files navigation

Arduino Snippets Plus for VS Code

This extension is a fork from arduino-snippets and adds configuration options.


Supports both *.ino and *.cpp files.


Usage

Type part of a snippet, press tab or enter to autofill the rest.

Configurations

Configuration Name Type Description
arduino-snippets-plus.same-line-curlies Bool Places curly brackets on the same line rather than the next line

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()

Contributions

If you want any additional configurations or features feel free to either open an issue or pull request :)

Packages

No packages published

Languages

  • TypeScript 100.0%