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
/* | |
Based on the Matter On/Off Plug-in Unit / Outlet example | |
Modified by JC for old mitsubishi electric HVAC unit using connector CN51 | |
*/ | |
#include <Matter.h> | |
#include <MatterOnOffPluginUnit.h> | |
MatterOnOffPluginUnit matter_outlet; | |
void handle_button_press(); |
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 sketch is the BLE GATT server for a halloween costume. | |
* For more information on the project, check this post: | |
* https://jcjc-dev.com/2019/11/11/esp32-arduino-bluetooth-halloween-costume/ | |
* | |
* Create a BLE server that, once we receive a connection, will poll a button and | |
* an accelerometer. If the button is pressed or the device is moved abruptly, | |
* the device will send a notification to the BLE clients. | |
* | |
* The service advertises itself as $BLE_STORM_SERVICE_UUID |
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 sketch is the BLE GATT client for a halloween costume. | |
* For more information on the project, check this post: | |
* https://jcjc-dev.com/2019/11/11/esp32-arduino-bluetooth-halloween-costume/ | |
* | |
* Author: Juan Carlos Jimenez Caballero | |
* | |
* License: Fully Open Source. Use at your own peril | |
* This firmware uses code found in Aruino's ESP32 BLE GATT example, and some | |
* snippets from other unlicensed open source projects |
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
"" Custom vim settings | |
"No need to be vi compatible. | |
:set nocompatible | |
"Searching | |
:set incsearch "Turn on incremental searching | |
:set ignorecase "Ignore case when searching | |
:set smartcase "Ignore case when typing lowercase, | |
"otherwise match case |
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 "mbed.h" | |
#include "USBMouse.h" //The library to work as a mouse | |
USBMouse mouse; //Declare the object mouse | |
DigitalIn myInput(p5); //Set an input to control when to send clicks | |
int main() { | |
myInput.mode(PullDown); //Internal pull-down in the input pin | |
while (1) { //Forever: | |
if(myInput.read()==1) //If the input button/switch is enabled |
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
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH |
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
##### | |
# The path to use the PyQt module and others installed using homebrew | |
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH | |
##### |
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
$ sudo nano ~/.bash_profile |
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
$ brew install pyqt |
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
#Code copied from: http://bit.ly/13yRYU4 | |
#And later modified a bit. | |
from PyQt4 import QtGui | |
from PyQt4 import QtCore | |
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT | |
import sys | |
class MyMainWindow(QtGui.QMainWindow): | |
NewerOlder