This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def toServe(playerTuple, sumOfPoints, game): | |
""" | |
The first player in arg playerTuple started serving | |
sumOfPoints of the current game | |
first game is 1 | |
""" | |
if sumOfPoints < 20: | |
# First player if even | |
player = int(sumOfPoints / 2) % 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#include <Fonts/FreeSans24pt7b.h> | |
// No IO Pin for Reset nedded, if oled Res 100nF to ground and 10k to 3.3V | |
#define OLED_RESET -1 | |
Adafruit_SSD1306 display(OLED_RESET); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ssd1306 | |
from machine import I2C, Pin | |
i2c = I2C(sda=Pin(4), scl=Pin(5)) | |
display = ssd1306.SSD1306_I2C(64, i2c) | |
display.fill(0) | |
display.text('Hallo',20,20) | |
display.show() |