Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
>>= 在这个例子中做了什么?
byte fsr = 2; fsr >>= 2;
我在这里遇到它: https ://github.com/sparkfun/MMA8452_Accelerometer/blob/master/Firmware/MMA8452Q_BasicExample/MMA8452Q_BasicExample.ino
它这样做:
fsr = fsr >> 2;
fsr >>= 2;
是
在按位上下文中,向右移动两个位。
在算术上下文中,fsr 中的数字除以 2^2(4);