Wire colors
my own standard, as there aren't any official ones appropriate for my use-case
Power
GND | |
higher Voltage - i. e. +5V or +12V | |
lower Voltage - i. e. +5V or +3.3V |
general rules
- red and black for power
- clock signals are white
- data is either blue or green
1-Wire protocols
Servo-PWM | |
Neopixel Data |
I²C
SDA | |
SCL |
#include <Wire.h>
Wire.begin()
Wire.requestFrom(8, 6); // request 6 bytes from peripheral device #8
while (Wire.available()) { // peripheral may send less than requested
char c = Wire.read(); // receive a byte as character
Serial.print(c); // print the character
}
Arduino
Dokumentation
SPI
COPI - Controller out, Peripheral in (MOSI) | |
CIPO - Controller in, Peripheral out (MISO) | |
SCK | |
CS - Chip Select (SS, STE, CE) | |
RST - Reset |
- What Could Go Wrong: SPI: Hackaday
- Raspberry Pi 4 - Multiple SPIs
UART
Rx - Receive on Controller | |
Tx - Transmit on Controller |
SoftwareSerial mySerial (rxPin, txPin);
mySerial.begin(9600);
mySerial.println("Hello World")