PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Simple Libraries
Social
libbadgetools
peb_irprint.c
1
#include "simpletools.h"
2
#include "
badgetools.h
"
3
4
int
irprint
(
const
char
*fmt, ...)
5
{
6
rgb
(
L
,
RED
);
7
char
buf[128];
8
va_list args;
10
va_start(args, fmt);
12
int
blocks = _dosprnt(fmt, args, buf);
13
va_end(args);
14
int
len = 1 + strlen(buf);
15
//stringView(buf, len);
16
ir_send
(buf, len);
17
rgb
(
L
,
OFF
);
18
return
blocks;
19
}
20
21
/*
22
TERMS OF USE: MIT License
23
24
Permission is hereby granted, free of charge, to any person obtaining a
25
copy of this software and associated documentation files (the "Software"),
26
to deal in the Software without restriction, including without limitation
27
the rights to use, copy, modify, merge, publish, distribute, sublicense,
28
and/or sell copies of the Software, and to permit persons to whom the
29
Software is furnished to do so, subject to the following conditions:
30
31
The above copyright notice and this permission notice shall be included in
32
all copies or substantial portions of the Software.
33
34
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40
DEALINGS IN THE SOFTWARE.
41
*/
42
L
#define L
For selecting the left of the two RGB LEDs. Example: rgb(L, RED) would set the left RGB LED to the co...
Definition:
badgetools.h:88
irprint
int irprint(const char *fmt,...)
Use to store transmit strings to another badge in a manner similar to displaying combinations of stri...
Definition:
peb_irprint.c:4
rgb
void rgb(int side, int color)
Sets the color of the left or right RGB LED. Examples: rgb(L, RED) makes the left RGB LED glow red...
Definition:
leds_rgb.c:9
ir_send
void ir_send(char *s, int ssize)
Transmits a string with a specified number of characters over IR.
Definition:
peb_ir_send.c:11
RED
#define RED
For setting an RGB LED's color to red. Examples: rgb(R, RED) sets the right RGB LED red...
Definition:
badgetools.h:128
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
OFF
#define OFF
OFF can be used in place of zero to enabled parameters in functions like drive_feedback and drive_tri...
Definition:
abdrive.h:139
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12