User Tools

Site Tools


wiki:forcesensor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:forcesensor [2014/05/25 06:36]
administrator
wiki:forcesensor [2019/05/28 11:22] (current)
Line 75: Line 75:
 <​code ​ javascript>​ <​code ​ javascript>​
     board.analogRead(pin0.pin,​ function( data ) {    ​     board.analogRead(pin0.pin,​ function( data ) {    ​
-        if(data.value ​< 200)+        if(data < 200)
             html.write(html_img_id,'​src',​force0);​             html.write(html_img_id,'​src',​force0);​
-        if(data.value ​> 200 && data.value ​< 400 )+        if(data > 200 && data < 400 )
             html.write(html_img_id,'​src',​force1); ​             html.write(html_img_id,'​src',​force1); ​
-        if(data.value ​> 400 && data.value ​< 600 )+        if(data > 400 && data < 600 )
             html.write(html_img_id,'​src',​force2);​             html.write(html_img_id,'​src',​force2);​
-        if(data.value ​> 600 && data.value ​< 800 )+        if(data > 600 && data < 800 )
             html.write(html_img_id,'​src',​force3);  ​             html.write(html_img_id,'​src',​force3);  ​
-        if(data.value ​> 800)+        if(data > 800)
             html.write(html_img_id,'​src',​force4); ​       ​             html.write(html_img_id,'​src',​force4); ​       ​
     });  ​     });  ​
wiki/forcesensor.txt ยท Last modified: 2019/05/28 11:22 (external edit)