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
Examples
Badge
05 EEPROM Data Storage
03 Store Retrieve Strings.c
1
/*
2
Store Retrieve Strings.c
3
Store strings to and then retrieve them from EEPROM and display them
4
in the SimpleIDE Terminal. REMEMBER to use the SimpleIDE's Run with
5
Terminal button.
6
*/
7
8
#include "simpletools.h"
// Include simpletools library
9
#include "
badgetools.h
"
// Include badgetools library
10
11
// badge num name
12
char
fred[] = {
"123\n Fred\n"
};
13
char
wilma[] = {
"456\n Wilma\n"
};
14
char
barney[] = {
"789\n Barney\n"
};
15
char
betty[] = {
"147\n Betty\n"
};
16
17
char
their[16];
// String for retrieved strings
18
19
void
main
()
// Main function
20
{
21
badge_setup
();
// Call badge setup
22
text_size
(
SMALL
);
23
oledprint
(
"Use SimpleIDE\nTerminal."
);
24
25
store
(wilma);
// Store two strings in EEPROM
26
store
(betty);
27
28
contacts_displayAll
();
// Display all stored strings
29
}
contacts_displayAll
void contacts_displayAll()
Display all contacts in SimpleIDE Terminal.
Definition:
peb_contacts_displayAll.c:12
store
int store(char *contact)
Store a character string of up to 128 characters to EEPROM. Example: char s[] = "abcd"; store(s);...
Definition:
peb_store.c:12
text_size
void text_size(int size)
Set the text size to either 32x16 pixel (LARGE) or 7x5 (SMALL) characters. Examples: text_size(LARGE)...
Definition:
oled_text_size.c:7
SMALL
#define SMALL
For setting oLED character size to 7x5 pixels. Example: text_size(SMALL).
Definition:
badgetools.h:200
oledprint
int oledprint(const char *fmt,...)
Use to display strings on the oLED display in a manner similar to displaying combinations of strings ...
Definition:
peb_text.c:4
main
int main(void)
Definition:
GraphicsTest.c:20
badge_setup
int badge_setup(void)
Set up all available badge drivers. Call this function at the start of any given program to allow acc...
Definition:
badgealpha.c:29
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12