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
#!/usr/bin/python | |
#title :send.py | |
#description :Send command and data byte to motor controller. | |
#author :helfrich | |
#================================================================ | |
import serial | |
import sys | |
ser = serial.Serial('/dev/ttyUSB0', 19200, timeout = 1) |
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
<?php | |
/* Pi Rover: Send POST data to Python script */ | |
/* http://goo.gl/tRcYrB */ | |
const MINIMAL_SPEED = 65; | |
const DELTA_SPEED = 75; | |
const STOP = 0; | |
const FORWARD = 1; |
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
#!/usr/bin/env python | |
import Tkinter as tk | |
from Tkinter import Button | |
from Tkinter import Scale | |
import json | |
import ast | |
import requests |
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
#!/bin/bash | |
# Pi Rover: take a command and send data to the Python script | |
if [ "$#" == "0" ]; then | |
echo "Usage: $0 movement speed" | |
exit 1 | |
fi | |
declare -ri minimal_speed=65 | |
declare -ri delta_speed=75 |
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
/* Copyright (c) 2012 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
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 helloanalytics; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.gson.GsonFactory; | |
import java.io.File; | |
import java.io.IOException; |
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
/* | |
* Copyright (C) 2018 | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
language: android | |
jdk: oraclejdk8 | |
#sudo: false | |
android: | |
components: | |
# Uncomment the lines below if you want to | |
# use the latest revision of Android SDK Tools | |
- tools |
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
language: android | |
android: | |
components: | |
- tools # to get the new `repository-11.xml` | |
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943) | |
- platform-tools | |
- build-tools-26.0.2 | |
- android-22 | |
- android-26 |
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
/** | |
* Lock the screen to the current orientation on Android | |
* https://stackoverflow.com/questions/4553650/how-to-check-device-natural-default-orientation-on-android-i-e-get-landscape | |
* https://stackoverflow.com/a/14150037/959505 | |
* | |
*/ | |
private void lockOrientation() { | |
int orientation = 0; | |
WindowManager windowService = (WindowManager) getSystemService(Context.WINDOW_SERVICE); | |
if (windowService != null) { |
OlderNewer