Commit ecfaf10d authored by Wouter Klop's avatar Wouter Klop

Added Streaming library via PIO library manager. To do: manage all libraries...

Added Streaming library via PIO library manager. To do: manage all libraries via PIO library manager, makes life a lot easier!
parent 4cb362e2
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# DRV8825
#
DEF DRV8825 U 0 40 Y Y 1 F N
F0 "U" -200 650 60 H V C CNN
F1 "DRV8825" -50 -100 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -350 600 250 -450 0 1 0 N
X CP1 1 350 400 100 L 25 25 1 1 w
X BOUT1 10 350 50 100 L 25 25 1 1 w
X VMB 11 50 700 100 D 25 25 1 1 W
X AVRef 12 -450 -350 100 R 25 25 1 1 I
X BVRef 13 -450 -400 100 R 25 25 1 1 I
X GND 14 -50 -550 100 U 25 25 1 1 W
X V3P3OUT 15 -450 -200 100 R 25 25 1 1 w
X nRESET 16 -450 450 100 R 25 25 1 1 I
X nSLEEP 17 -450 500 100 R 25 25 1 1 I
X nFAULT 18 350 -350 100 L 25 25 1 1 I
X DECAY 19 -450 250 100 R 25 25 1 1 I
X CP2 2 350 350 100 L 25 25 1 1 w
X DIR 20 -450 300 100 R 25 25 1 1 I
X nEN 21 -450 550 100 R 25 25 1 1 I
X STEP 22 -450 350 100 R 25 25 1 1 I
X NC 23 -150 -550 100 U 25 25 1 1 N
X MODE0 24 -450 100 100 R 25 25 1 1 I
X MODE1 25 -450 50 100 R 25 25 1 1 I
X MODE2 26 -450 0 100 R 25 25 1 1 I
X nHOME 27 350 -400 100 L 25 25 1 1 I
X GND 28 0 -550 100 U 25 25 1 1 W
X GND(pad) 29 50 -550 100 U 25 25 1 1 W
X VCP 3 350 550 100 L 25 25 1 1 W
X VMA 4 0 700 100 D 25 25 1 1 W
X AOUT1 5 350 200 100 L 25 25 1 1 w
X ISENA 6 350 -200 100 L 25 25 1 1 I
X AOUT2 7 350 150 100 L 25 25 1 1 w
X BOUT2 8 350 0 100 L 25 25 1 1 w
X ISENB 9 350 -250 100 L 25 25 1 1 I
ENDDRAW
ENDDEF
#
# ESP32-devKit
#
DEF ESP32-devKit U 0 40 Y Y 1 F N
......
{
"name": "Streaming",
"keywords": [
"print",
"output",
"operator",
"template"
],
"description": "Streaming C++-style Output with Operator <<",
"authors": [
{
"email": "[email protected]",
"url": "http://arduiniana.org",
"maintainer": false,
"name": "Mikal Hart"
}
],
"version": "5",
"downloadUrl": "http://arduiniana.org/Streaming/Streaming5.zip",
"frameworks": [
"arduino"
],
"platforms": [
"atmelavr",
"atmelsam",
"espressif32",
"espressif8266",
"intel_arc32",
"microchippic32",
"nordicnrf51",
"nordicnrf52",
"ststm32",
"teensy",
"timsp430"
],
"export": {
"include": "Streaming"
},
"id": 560
}
\ No newline at end of file
#include <Streaming.h>
void setup()
{
Serial.begin(9600);
int lettera = 'A';
int month = 4, day = 17, year = 2009;
Serial << "This is an example of the new streaming" << endl;
Serial << "library. This allows you to print variables" << endl;
Serial << "and strings without having to type line after" << endl;
Serial << "line of Serial.print() calls. Examples: " << endl;
Serial << "A is " << lettera << "." << endl;
Serial << "The current date is " << day << "-" << month << "-" << year << "." << endl;
Serial << "You can use modifiers too, for example:" << endl;
Serial << _BYTE(lettera) << " is " << _HEX(lettera) << " in hex. " << endl;
}
void loop()
{}
/*
Streaming.h - Arduino library for supporting the << streaming operator
Copyright (c) 2010-2012 Mikal Hart. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ARDUINO_STREAMING
#define ARDUINO_STREAMING
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#define STREAMING_LIBRARY_VERSION 5
// Generic template
template<class T>
inline Print &operator <<(Print &stream, T arg)
{ stream.print(arg); return stream; }
struct _BASED
{
long val;
int base;
_BASED(long v, int b): val(v), base(b)
{}
};
#if ARDUINO >= 100
struct _BYTE_CODE
{
byte val;
_BYTE_CODE(byte v) : val(v)
{}
};
#define _BYTE(a) _BYTE_CODE(a)
inline Print &operator <<(Print &obj, const _BYTE_CODE &arg)
{ obj.write(arg.val); return obj; }
#else
#define _BYTE(a) _BASED(a, BYTE)
#endif
#define _HEX(a) _BASED(a, HEX)
#define _DEC(a) _BASED(a, DEC)
#define _OCT(a) _BASED(a, OCT)
#define _BIN(a) _BASED(a, BIN)
// Specialization for class _BASED
// Thanks to Arduino forum user Ben Combee who suggested this
// clever technique to allow for expressions like
// Serial << _HEX(a);
inline Print &operator <<(Print &obj, const _BASED &arg)
{ obj.print(arg.val, arg.base); return obj; }
#if ARDUINO >= 18
// Specialization for class _FLOAT
// Thanks to Michael Margolis for suggesting a way
// to accommodate Arduino 0018's floating point precision
// feature like this:
// Serial << _FLOAT(gps_latitude, 6); // 6 digits of precision
struct _FLOAT
{
float val;
int digits;
_FLOAT(double v, int d): val(v), digits(d)
{}
};
inline Print &operator <<(Print &obj, const _FLOAT &arg)
{ obj.print(arg.val, arg.digits); return obj; }
#endif
// Specialization for enum _EndLineCode
// Thanks to Arduino forum user Paul V. who suggested this
// clever technique to allow for expressions like
// Serial << "Hello!" << endl;
enum _EndLineCode { endl };
inline Print &operator <<(Print &obj, _EndLineCode arg)
{ obj.println(); return obj; }
#endif
#######################################
# Syntax Coloring Map for Streaming
#######################################
#######################################
# Datatypes (KEYWORD1)
#######################################
Streaming KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
_HEX KEYWORD2
_DEC KEYWORD2
_OCT KEYWORD2
_BIN KEYWORD2
_BYTE KEYWORD2
#######################################
# Constants (LITERAL1)
#######################################
endl LITERAL1
{
"name": "Streaming",
"keywords": "print, output, operator, template",
"description": "Streaming C++-style Output with Operator <<",
"authors":
{
"name": "Mikal Hart",
"email": "[email protected]",
"url": "http://arduiniana.org"
},
"version": "5",
"downloadUrl": "http://arduiniana.org/Streaming/Streaming5.zip",
"include": "Streaming",
"frameworks": "arduino",
"platforms": "*"
}
......@@ -18,3 +18,6 @@ monitor_speed = 115200
; upload_port = balancingrobot.local
upload_port = 192.168.178.33
; upload_port = 192.168.4.1
lib_deps =
[email protected]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment