On Mon, Sep 21, 2020, 4:00 AM Shinjiro Kaizetsu <ultramaste...@gmail.com>
wrote:

> Hello i found you from your python library and i have a trouble about
> pyserial library. I cant find any solution yet and im hoping you can help
> me.
>
> I need to send mouse coordinates from python to arduino. As you know there
> is X and Y axis and there is some negative values like -15 or -10 etc. on
> those axis. Arduino's serial only accepts Bytes so bytes are limited with 0
> to 256. My problem is starts right here. I cant send negative values from
> python to arduino. Here is my code for python :
>
>
>
>
> *def mouse_move(x, y): pax = [x,y] arduino.write(pax) print(pax)*
>
> *and heres for arduino :*
>
>
>
>
>
>
>
>
>
>
> * #include <Mouse.h> byte bf[2]; void setup() { Serial.begin(9600);
> Mouse.begin(); } void loop() { if (Serial.available() > 0) {
> Serial.readBytes(bf, 2); Mouse.move(bf[0], bf[1], 0); Serial.read(); } } *
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sphinx-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sphinx-users/fb90ef7d-3e57-461c-bfd7-5aae644c5f3en%40googlegroups.com
> <https://groups.google.com/d/msgid/sphinx-users/fb90ef7d-3e57-461c-bfd7-5aae644c5f3en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/CAELGjd-oKm4JVLO%2BRurUiPduefCkpNmJ1kwRSU%2BMnW7kXcf8zg%40mail.gmail.com.

Reply via email to