hautot hautot
/
carte_mesure
CNA ltc1655 et adg715
cherche_tension.h@0:fbc63633ebee, 2015-06-10 (annotated)
- Committer:
- denishautot
- Date:
- Wed Jun 10 07:20:17 2015 +0000
- Revision:
- 0:fbc63633ebee
Projet sts2 lycee victor hugo Besesancon
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
denishautot | 0:fbc63633ebee | 1 | unsigned int cherche_tension (unsigned int valnum) |
denishautot | 0:fbc63633ebee | 2 | { cna.write(valnum); |
denishautot | 0:fbc63633ebee | 3 | while (ina.read()>=0.5) { |
denishautot | 0:fbc63633ebee | 4 | myled = 1; |
denishautot | 0:fbc63633ebee | 5 | valnum = valnum+5; |
denishautot | 0:fbc63633ebee | 6 | cs=0; |
denishautot | 0:fbc63633ebee | 7 | // pc.printf("%U \n\r",ina.read()); |
denishautot | 0:fbc63633ebee | 8 | cna.write(valnum); |
denishautot | 0:fbc63633ebee | 9 | cs=1; |
denishautot | 0:fbc63633ebee | 10 | } |
denishautot | 0:fbc63633ebee | 11 | while (ina.read()<=0.5) { |
denishautot | 0:fbc63633ebee | 12 | myled = 1; |
denishautot | 0:fbc63633ebee | 13 | valnum = valnum-5; |
denishautot | 0:fbc63633ebee | 14 | cs=0; |
denishautot | 0:fbc63633ebee | 15 | // pc.printf("%U \n\r",ina.read()); |
denishautot | 0:fbc63633ebee | 16 | cna.write(valnum); |
denishautot | 0:fbc63633ebee | 17 | cs=1; |
denishautot | 0:fbc63633ebee | 18 | } |
denishautot | 0:fbc63633ebee | 19 | pc.printf("%U \n\r",ina.read()); |
denishautot | 0:fbc63633ebee | 20 | return (valnum); |
denishautot | 0:fbc63633ebee | 21 | |
denishautot | 0:fbc63633ebee | 22 | |
denishautot | 0:fbc63633ebee | 23 | } |