Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- fvdmarkt
- Date:
- 2013-11-15
- Revision:
- 0:b5be9edd001e
File content as of revision 0:b5be9edd001e:
#include "mbed.h"
#include <TextLCD.h>
// aangepast aan mijn display CFAH2004ATMIJP
// 5-12-2010 FLM
DigitalOut led(LED2);
TextLCD lcd(p10, p11, p16, p17, p18, p19, TextLCD::LCD20x4); // rs, e, d4-d7
void testing2()
{
lcd.cls();
wait(1);
lcd.printf("Hello World too!\n");
wait(2);
}
void testing3()
{
int k;
lcd.cls();
wait(0.5);
for (k=32; k<128; k++) {
lcd.putc(k);
wait(0.05);
}
lcd.cls();
wait(0.5);
for (k=160; k<255; k++) {
lcd.putc(k);
wait(0.05);
}
}
void blinkled()
{
int i;
for (i=0; i<5; i++) {
led = 1;
wait(0.500); // 1000 ms
led = 0;
wait(0.500);
}
}
int main() {
blinkled();
testing2();
while (1) {
testing3();
}
}
/*
Dakje boven 6, dubbel accentje, enkel accentje, backtick en golfje
werken niet in deze editor met FireFox 3.6.12 en Ubuntu 10.10 als USA
international is ingeschakeld met dead keys.
Het werkt wel met keyboard USA.
*/