Search found 56 matches

by cyberlab
Sat Apr 28, 2018 5:28 pm
Forum: ESP8266 boards
Topic: ~ operator binary complement
Replies: 18
Views: 13413

Re: ~ operator binary complement

good day to all, OutoftheBOTS_ with the novelty that does not throw errors but only sends 00000000 zeros to the outport. apparently with the changes mentioned is reading one of the 4 bytes in which python stores the integers and is not the one that contains the relevant data, I'm not sure about that...
by cyberlab
Fri Apr 27, 2018 9:10 pm
Forum: ESP8266 boards
Topic: ~ operator binary complement
Replies: 18
Views: 13413

Re: ~ operator binary complement

hello again and thanks for your interest, my project consists of 2 applications one is installed on a pc and consists of sending a binary file to an esp8266 module via wifi and the second is the one I install in that module which consists of reading the binary file of one byte at a time complement t...
by cyberlab
Fri Apr 27, 2018 3:44 pm
Forum: ESP8266 boards
Topic: ~ operator binary complement
Replies: 18
Views: 13413

Re: ~ operator binary complement

good day OutoftheBOTS_ thanks for answering, then according to the information I need the complement of an unsigned byte as well as the zero number ie 00000000 = 11111111 then it would be the option byte ^ 0xff, but I do not know how to implement it so that I do not get errors before mentioned.
by cyberlab
Fri Apr 27, 2018 4:13 am
Forum: ESP8266 boards
Topic: ~ operator binary complement
Replies: 18
Views: 13413

Re: ~ operator binary complement

hello, thanks again for your time answering, dhylans deal with byte = ~ f.read (1) [0] but TypeError: object with buffer protocol required. and pythoncoder deal with byte = f.read (1) ^ 0xff as well bitwise = byte ^ 0xff but TypeError: unsupported types for __xor__: 'bytes', 'int' and with bitwise =...
by cyberlab
Thu Apr 26, 2018 3:24 am
Forum: ESP8266 boards
Topic: ~ operator binary complement
Replies: 18
Views: 13413

Re: ~ operator binary complement

hello thank you for answering pythoncoder, I am learning to program in micropython with a nodemcu module, well the question is that in my application I need to read a binary file one byte at a time complement it and send it to a machinein parallel fashion, is already working but the complementation ...
by cyberlab
Sat Apr 21, 2018 5:09 am
Forum: ESP8266 boards
Topic: ~ operator binary complement
Replies: 18
Views: 13413

~ operator binary complement

it seems that the operator ~ is not implemented in micropython, what is the best way to complement a byte? thanks in advance.