MCP23017 x 16LED @ ARDUINO
16-bit remote bidirectional I/O port
1.8...5.5V DC
Low standby current: 1 µA
// COUNT 0..65535 IN BINARY:
for (uint16_t i=0; i < 0xFFFF ; i++) { // cycle
mcp.writeGPIOAB(i);
}
// DULL PWM:
for (int ir=0; ir < 2000 ; ir++) {
mcp.writeGPIOAB(0b0000000000000000);
mcp.writeGPIOAB(0b1111111111111111);
mcp.writeGPIOAB(0b0111111111111111);
mcp.writeGPIOAB(0b0011111111111111);
mcp.writeGPIOAB(0b0001111111111111);
mcp.writeGPIOAB(0b0000111111111111);
mcp.writeGPIOAB(0b0000011111111111);
mcp.writeGPIOAB(0b0000001111111111);
mcp.writeGPIOAB(0b0000000111111111);
mcp.writeGPIOAB(0b0000000011111111);
mcp.writeGPIOAB(0b0000000001111111);
mcp.writeGPIOAB(0b0000000000111111);
mcp.writeGPIOAB(0b0000000000011111);
mcp.writeGPIOAB(0b0000000000001111);
mcp.writeGPIOAB(0b0000000000000111);
mcp.writeGPIOAB(0b0000000000000011);
mcp.writeGPIOAB(0b0000000000000001); }
Žádné komentáře:
Okomentovat