[Howto] Raspberry Pi + I²C + MCP23017 + C (minimal example)
minimal working example: read data from MCP23017-register and print it to screen.
minimal working example: read data from MCP23017-register and print it to screen.
purpose: measuring the timespan between rising/falling-edge (=off/on/off-change) of a digital-output-bank (GPA0…GPA7) testing equipment: -Raspberry Pi 3 Modell B-I2C-adress of MCP23017-chip = 0x20-MCP23017 register-adress of 8 digital-outputs: 0x14-Owon SDS7102 digital ocsilloscope conclusion: I²C-baudrate bash Python C 100.000 5,18 ms @ 75 … Continued
situation:images are binary coded. If you try to interpret/decode them as UTF-8, they can contain UTF-8 invalid characters (e.g. 0xFF) problem:if your database uses the UTF-8 encoding, you can’t save this invalid bytes in this database. (“invalid byte sequence warning”) … Continued
the server-program sends the string “TestTestTest”. the client-programm receives the string and prints it on terminal. server-program: #include <unistd.h> #include <stdio.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> int main(int argc, char *argv[]) { int listenfd = 0; int connfd … Continued