This file contains hidden or 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
pragma solidity ^0.4.11; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal constant returns (uint256) { | |
uint256 c = a * b; |
This file contains hidden or 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
0xEffB8759ACB5C5cf5A97C80D7400F8fBd4F81Eb6 |
This file contains hidden or 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
cb13cf4bf1b142aab8dc9d3c73d54716caf14f7c |
This file contains hidden or 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
void in_round_turn(){ | |
if(!inAuto) return; | |
if(!in_round) { | |
if(center[1]>40 && center[2]>40) setServoDegree(-30), in_round = 1; // turn right if top center line is on the right side | |
else setServoDegree(30), in_round = 2; // else turn left | |
} else{ // if in round && center line points to black img | |
switch(in_round){ | |
case 1: | |
setServoDegree(-30); | |
break; |
This file contains hidden or 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
/* | |
* main.cpp | |
* | |
* Author: Peter | |
* Copyright (c) 2014-2015 HKUST SmartCar Team | |
* Refer to LICENSE for details | |
*/ | |
#include <cassert> | |
#include <cstring> |
This file contains hidden or 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 processing.serial.*; | |
import java.util.*; | |
Serial myPort; | |
int globalWidth = 80; | |
int globalHeight = 60; | |
int globalSpeed = 0; | |
int displaySpeed; |
This file contains hidden or 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
'use strict'; | |
const PAGE_ACCESS_TOKEN = process.env.PAGE_ACCESS_TOKEN; | |
const APIAI_TOKEN = process.env.APIAI_TOKEN; | |
const WEATHER_API_KEY = process.env.WEATHER_API_KEY; | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const request = require('request'); | |
const apiai = require('apiai'); |
This file contains hidden or 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 processing.serial.*; | |
import java.util.*; | |
Serial myPort; | |
int globalWidth = 80; | |
int globalHeight = 60; | |
int globalSpeed = 0; | |
int displaySpeed; |
This file contains hidden or 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
* | |
* main.cpp | |
* | |
* Author: Peter | |
* Copyright (c) 2014-2015 HKUST SmartCar Team | |
* Refer to LICENSE for details | |
*/ | |
#include <cassert> | |
#include <cstring> |
This file contains hidden or 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
/* | |
* main.cpp | |
* | |
* Author: Peter | |
* Copyright (c) 2014-2015 HKUST SmartCar Team | |
* Refer to LICENSE for details | |
*/ | |
#include <cassert> | |
#include <cstring> |