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
//data[] is byte array to calculate CRC16 | |
byte res[8]; //result is stored in this array | |
void ModRTU_CRC(byte data[]) { | |
uint16_t crc = 0xFFFF; | |
for (int pos = 0; pos < 6; pos++) { //6 is data array length | |
res[pos] = data[pos]; | |
crc ^= (uint16_t)data[pos]; // XOR byte into least sig. byte of crc | |
for (int i = 8; i != 0; i--) { // Loop over each bit |
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 <SoftwareSerial.h> | |
SoftwareSerial A6Module(10, 11); //RX,TX | |
char input='\0'; | |
void setup() { | |
A6Module.begin(115200); | |
Serial.begin(9600); | |
delay(500); |
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 <SoftwareSerial.h> | |
SoftwareSerial A6Module(10, 11); //RX,TX | |
char input='\0'; | |
void setup() { | |
A6Module.begin(115200); | |
Serial.begin(9600); | |
delay(500); |
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 <LiquidCrystal.h> | |
LiquidCrystal lcd(7, 6, 5, 4, 3, 2); | |
int starttime; | |
int activetime; | |
int prevoustime = 0; | |
//set time before compile+++++++++++ | |
int hours = 19; |
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
/* | |
NOKIA 1100 Screen | |
This is the driver of the LCD based on code by spiralbrain | |
modified by: | |
name:kuldeep singh dhaka | |
email:kuldeepdhaka9@gmail.com | |
date:17 May 2012 | |
Source: http://sunbizhosting.com/~spiral/ | |
Driver For Arduino Dueminalove Atmega328 |
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
import sys | |
import cv2 | |
from PIL import Image, ImageTk | |
from Tkinter import Tk, Label | |
import Support | |
def vp_start_gui(): | |
'''Starting point when module is the main routine.''' | |
global val, w, root |
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
import CamHandler | |
import defTstWindow | |
import threading | |
import time | |
threading.Thread(target=CamHandler.getFrame).start() | |
time.sleep(1) | |
threading.Thread(target=defTstWindow.makeGUI).start() |
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
import sys | |
import cv2 | |
import Image, ImageTk | |
from Tkinter import * | |
import Support | |
def makeGUI(): | |
top=Tk() |
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
import cv2 | |
import numpy as np | |
import Support | |
cam=cv2.VideoCapture(0) | |
def getFrame(): | |
while 1: | |
_,frm=cam.read() |
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
import cv2 | |
global frame | |
frame=None |