This file contains 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
from threading import Lock | |
from paho.mqtt.client import Client | |
CLIENTID = "Mediator" | |
HOST = "localhost" | |
BASETOPIC = "actuator" | |
SUBTOPIC = "sensor/#" | |
table = dict() | |
mutex = Lock() |
This file contains 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
""" | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the |
This file contains 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 <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
unsigned char z; | |
DDRD=0xFF; | |
PORTD=0xAA; |
This file contains 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
class ListaConcatenata: | |
class Nodo: | |
val = None | |
prossimo = None | |
def __init__(self): | |
self.testa = None | |
def aggiungi(self, n_val): | |
if self.testa is None: |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/eclipse/paho.mqtt.golang" | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
) |
This file contains 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
""" | |
Installare le dipendenze tramite: | |
pip3 install requests audioop pyaudio | |
ed eseguire: | |
python3 lamp_control.py | |
""" | |
import requests | |
import audioop |
This file contains 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
FROM openjdk:11.0.8 | |
ENV CLASSPATH="/usr/lib/jade/jade.jar" | |
RUN wget --no-check-certificate -O jade.zip https://jade.tilab.com/dl.php?file=JADE-bin-4.5.0.zip | |
RUN unzip jade.zip && mkdir /usr/lib/jade && mv jade/lib/jade.jar /usr/lib/jade/jade.jar && rm -rf jade/ jade.zip | |
CMD [""] |
This file contains 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 <MoodyEsp8266.h> | |
#include <DHT.h> | |
#include "certs.h" | |
#define DATA_PIN 0 | |
#define DHT_TYPE DHT11 | |
MoodySensor sensor; | |
DHT dht(DATA_PIN, DHT_TYPE); |
This file contains 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 <FastLED.h> | |
#define NUM_LEDS 64 | |
#define DATA_PIN 0 | |
CRGB leds[NUM_LEDS]; | |
int set = 0; | |
void setup() { |
This file contains 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 <PDM.h> | |
#include <arm_math.h> | |
#include <Arduino_HTS221.h> | |
#include <Arduino_LPS22HB.h> | |
#include <Arduino_APDS9960.h> | |
#include <ArduinoBLE.h> | |
#define BLE_NAME "Moody-ble" |
OlderNewer