#include "picnic.h"
#include <stdio.h>
main()
{
PICNIC *pn;
int a,i;
pn = PN_open("192.168.0.200", 10000, 10001, 10002);
if(!pn){
printf("PN_open error.\n");
exit(1);
}
for (i=0; i<3; i++) {
a += PN_adinp(pn, PICNIC_PORTA, 1, 0);
sleep(1);
}
printf ("%.2f\n", (3000.0 * (float)a / 3.0 * (5.0 / 1024.0)) / (0.9 * 0.97 * 1000.0));
PN_close(pn);
return 0;
}