![]() |
2009-11-28
, 12:31
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#2
|
![]() |
2009-11-28
, 13:11
|
Posts: 8 |
Thanked: 0 times |
Joined on Nov 2009
|
#3
|
![]() |
2009-11-28
, 13:23
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#4
|
![]() |
2009-11-28
, 13:38
|
Posts: 8 |
Thanked: 0 times |
Joined on Nov 2009
|
#5
|
![]() |
2009-11-28
, 13:40
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#6
|
![]() |
2009-11-28
, 13:49
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#7
|
it works in python for unsigned values:
a = 45
b = 51
val = (a<<8) | b
print val >> 8
print val & 0xFF
--
you my add 99 to both a, b before sending, and minus 99 after:
a = -45 + 99
b = -51 + 99
val = (a<<8) | b
print (val >> 8) - 99
print (val & 0xFF) - 99
to avoid negative values
![]() |
2009-11-29
, 10:52
|
Posts: 15 |
Thanked: 48 times |
Joined on Nov 2009
@ United Kingdom
|
#8
|
lately im working on an exciting project
but i got a problem about about sending two variables at same time via bluez module
therefore,i need to send these two variables as a tuple object , i guess
infact i found a way send two variables at same time as string but it's too laggy and sometimes causing errors
here is my solution which is so laggy:
on client:
def senderfunction():
socket.send(str(a)+' '+str(b))
on server:
a=int(incomingdata[0:3])
b=int(incomingdata[4:len(incomingdata)]
please help
Mplayer Full ShortCut List
http://www.keyxl.com/aaa2fa5/302/MPl...-shortcuts.htm
Mclightning.com
DegCal - Right Triangle Degree Calculator