You just cannot send it this way.. You have to break it down in bytes,
store them in a list and send it...

2010/9/6 Kaan AKŞİT <kun...@gmail.com>:
> Dear all,
>
> I am having some trouble with sending 32 bit integers with write function of
> endpoint class.
>
> I am having trouble with the following line:
>
> self.ep.write(2400000)
>
> Output:
>
> Traceback (most recent call last):
>   File "usbir.py", line 114, in <module>
>     sys.exit(main())
>   File "usbir.py", line 109, in main
>     glass.set_rate(10)
>   File "usbir.py", line 69, in set_rate
>     self.write(int(w))
>   File "usbir.py", line 90, in write
>     self.ep.write(data)
>   File "/usr/lib/python2.6/site-packages/usb/core.py", line 260, in write
>     return self.device.write(self.bEndpointAddress, data, self.interface,
> timeout)
>   File "/usr/lib/python2.6/site-packages/usb/core.py", line 588, in write
>     array.array('B', data),
> TypeError: 'int' object is not iterable
>
> I have an array of 32 bit integer values therefore I need some solid
> solution that does it all.
>
> Best regards,
> Kaan
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>



-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to