Skip to content

Instantly share code, notes, and snippets.

View 80-svg's full-sized avatar

Makis 80-svg

  • unemployed
  • 03:34 (UTC +03:00)
View GitHub Profile
@80-svg
80-svg / main.cpp
Created July 22, 2025 12:42
This is a mini-project I did, if the potentiometer is under 3V the green light lights up, if it is 3-4V the orange light lights up, and if it is more than 4V, the red light lights up
#include <Arduino.h>
const int greenLED = 10;
const int orangeLED = 9;
const int redLED = 8;
const int volPin = A2;
int dt = 250;
int readVal = 0;
float volts = 0;
void setup() {
// put your setup code here, to run once:
@80-svg
80-svg / main.java
Created March 24, 2025 20:38
Example heal command
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (command.getName().equalsIgnoreCase("heal")) {
if (sender instanceof Player) {
Player player = (Player) sender;
player.setHealth(20);
player.setFoodLevel(20);
}
}
return true;