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 | |
from pygame.locals import * | |
import numpy as np | |
import pygame as pg | |
import random | |
import time | |
start = time.time() | |
FPS = 150 # frames per second setting |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Oct 10 18:44:48 2017 | |
@author: shash | |
""" | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.models import Sequential | |
from keras.layers import * |
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<Wire.h> | |
const int MPU_addr=0x68; | |
double AccelX,AccelY,AccelZ,Tmp,GyroX,GyroY,GyroZ; //These will be the raw data from the MPU6050. | |
uint32_t timer; //it's a timer, saved as a big-ass unsigned int. We use it to save times from the "micros()" command and subtract the present time in microseconds from the time stored in timer to calculate the time for each loop. | |
double Angle_X, Angle_Y; //These are the angles in the complementary filter | |
#define degconvert 57.29577951 //there are like 57 degrees in a radian. | |
double currentAngle = 0; | |
#define m1_left 12 | |
#define m1_right 10 |
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
module master(data,address,clk,rw,sda,scl,register,data_wr); | |
output reg sda; | |
input [7:0] data; | |
input [7:0] data_wr; | |
reg [7:0]data_wr_dup; | |
input clk; | |
input rw; | |
output reg scl; | |
input [6:0] address; | |
input [7:0] register; |
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
/* Developed By: www.hellocodings.com---------------------------- | |
---Shashi Suman-------------------------------------------------- | |
---Modify as you want-------------------------------------------- | |
---------------------------------------------------------------*/ | |
#include<Wire.h> | |
const int MPU_addr=0x68; | |
double AccelX,AccelY,AccelZ,Tmp,GyroX,GyroY,GyroZ; //These will be the raw data from the MPU6050. | |
uint32_t timer; //it's a timer, saved as a big-ass unsigned int. We use it to save times from the "micros()" command and subtract the present time in microseconds from the time stored in timer to calculate the time for each loop. | |
double Angle_X, Angle_Y; //These are the angles in the complementary filter | |
#define degconvert 57.29577951 //there are like 57 degrees in a radian. |
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 <PID_v1.h> | |
#include <Wire.h> | |
const int MPU_addr=0x68; | |
double AccelX,AccelY,AccelZ,Tmp,GyroX,GyroY,GyroZ; //These will be the raw data from the MPU6050. | |
uint32_t timer; //it's a timer, saved as a big-ass unsigned int. We use it to save times from the "micros()" command and subtract the present time in microseconds from the time stored in timer to calculate the time for each loop. | |
double Angle_X, Angle_Y; //These are the angles in the complementary filter | |
#define degconvert 57.29577951 //there are like 57 degrees in a radian. | |
#define m1_left 12 |
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 <PID_v1.h> | |
#include <Wire.h> | |
const int MPU_addr=0x68; | |
double AccelX,AccelY,AccelZ,Tmp,GyroX,GyroY,GyroZ; //These will be the raw data from the MPU6050. | |
uint32_t timer; //it's a timer, saved as a big-ass unsigned int. We use it to save times from the "micros()" command and subtract the present time in microseconds from the time stored in timer to calculate the time for each loop. | |
double Angle_X, Angle_Y; //These are the angles in the complementary filter | |
#define degconvert 57.29577951 //there are like 57 degrees in a radian. | |
#define m1_left 12 |
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 <ESP8266WiFi.h> | |
#include <WebSocketsServer.h> | |
const char* ssid = "********"; | |
const char* password = "**********"; | |
const int pinLed0 = 2; | |
uint8_t num; | |
int a = 0; | |
WebSocketsServer webSocket = WebSocketsServer(81); |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title></title> | |
<meta name="viewport" content="width=device-width, height=device-height"> | |
<script> | |
var con; | |
function web(){ | |
con = new WebSocket('ws://192.168.1.5:81/',['arduino']); | |
con.onopen = function(event){ |
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
module Slave( | |
inout sda, | |
input scl | |
); | |
parameter [6:0] address = 7'b1101001; | |
reg [7:0] temp = 8'bx; | |
reg [6:0] s_add; | |
parameter [6:0] register = 7'b1001010; | |
reg[7:0] array[0:75]; | |
reg[7:0] array2[0:75]; |
OlderNewer