connect(HOST, PORT); // Connect to brickd // Don't use device before ipcon is connected // Download example image here: // https://raw.githubusercontent.com/Tinkerforge/e-paper-296x128-bricklet/master/software/examples/tf_red.png $image = imagecreatefrompng('tf_red.png'); // Get black/white pixels from image and write them to the Bricklet buffer $pixelsBW = boolArrayFromImage($image, 0xFF, 0xFF, 0xFF); $epaper->writeBlackWhite(0, 0, WIDTH-1, HEIGHT-1, $pixelsBW); // Get red pixels from image and write them to the Bricklet buffer $pixelsRed = boolArrayFromImage($image, 0xFF, 0, 0); $epaper->writeColor(0, 0, WIDTH-1, HEIGHT-1, $pixelsRed); // Draw buffered values to the display $epaper->draw(); echo "Press ctrl+c to exit\n"; ?>