Test program for MjAD520x.

Dependencies:   MjAD520x mbed

Committer:
matsujirushi
Date:
Sun Oct 18 05:14:33 2015 +0000
Revision:
0:22572a5860df
created.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
matsujirushi 0:22572a5860df 1 #include "mbed.h"
matsujirushi 0:22572a5860df 2 #include "MjAD520x.h"
matsujirushi 0:22572a5860df 3
matsujirushi 0:22572a5860df 4 MjAD520x potentiometer(p5, p6, p7, p8, 10000);
matsujirushi 0:22572a5860df 5
matsujirushi 0:22572a5860df 6 int main()
matsujirushi 0:22572a5860df 7 {
matsujirushi 0:22572a5860df 8 while(1) {
matsujirushi 0:22572a5860df 9 potentiometer.write(0, 0);
matsujirushi 0:22572a5860df 10 wait(2);
matsujirushi 0:22572a5860df 11
matsujirushi 0:22572a5860df 12 potentiometer.write(0, 2000);
matsujirushi 0:22572a5860df 13 wait(2);
matsujirushi 0:22572a5860df 14
matsujirushi 0:22572a5860df 15 potentiometer.write(0, 10000);
matsujirushi 0:22572a5860df 16 wait(2);
matsujirushi 0:22572a5860df 17 }
matsujirushi 0:22572a5860df 18 }
matsujirushi 0:22572a5860df 19