Announcement

Collapse
No announcement yet.

uvga + 4d visi + arduino + car sensor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61


    i have msn not skype

    Comment


    • #62


      kaddrison at hotmail dot com

      Comment


      • #63


        it's ok

        thanks

        Comment


        • #64


          Ardunio

          moved to com for testing

          void setup(){
          Serial.begin(9600);

          }
          void loop()
          {


          unsigned int new_turbo = analogRead(3);
          unsigned int ancien_turbo=3;
          int pression;
          pression=map(new_turbo,0,1024,0,30);

          if(new_turbo != ancien_turbo)
          {
          Serial.print(pression,BYTE);
          ancien_turbo=new_turbo;
          delay(1000);
          }


          }

          only thing I have changed is that you had println which adds a CR LF character 0D 0A

          Display

          Again changed com for testing

          func main()
          com_SetBaud(COM0,960);
          com1_Init;



          repeat
          var char;
          char := serin(); // test the com port
          if (char >= 0) // if a valid character is received
          gfx_MoveTo(0,0);
          print([DEC2Z]char); // process the character
          endif
          forever
          endfunc

          only thing changed here is where it prints and the DEC2Z to get 2 character padded with a zero

          both ends work as I would expect now - i can connect 3.3v etc to A2D3 and get the output you need (1 character) which if I send the same 1 Character to the display get this displayed on the screen

          on MSN if you want to add me

          Comment


          • #65


            i had on you on msn tell me when you have time.

            thanks

            Comment


            • #66


              on now but no contacts are coming up

              Comment


              • #67


                arf, my msn: broks.anthony at caramail dot com

                Comment


                • #68


                  it's ok now, the needle moove instead the byte receive

                  also i have put the gauge in the one if, not put the print(UDEC2Z]char) with the gauge in one if, so we have to make 2 if for print and for gauge

                  i put the code 4dgl and arduino with one if just to view the gauge, and it's work fine.

                  but maybe i can improve the refresh, this time i use the baud 115200, if you know a way to improve it

                  have a look on vids:
                  http://[video=youtube_share;Tko2Ut9n...be/Tko2Ut9n23w[/video]

                  thanks karl for your helps!


                  Attached files jauge_4dgl.zip (650.5 KB) sketch_aug17a.zip (316 B)

                  Comment

                  Working...
                  X