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
@echo off | |
REM Usage: send_files.cmd <path to scripts dir> <file with ip addresses> | |
rem example: C:\\TRIKStudio\\send_files.cmd C:\Users\Dell\Desktop\send_files ip_adr.txt | |
Setlocal EnableDelayedExpansion | |
set TRIK_DIR=%~dp0 | |
set WINSCP_PATH=%TRIK_DIR%\winscp\winscp.com | |
set SCRIPT_PATH=%1 | |
SET mydir=%cd% | |
set PUT_ALL= |
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
@echo off | |
REM Usage: win_scr.cmd <full path to dir with fields> <relative path to js file> | |
for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x | |
chcp 1251>nul | |
SET TRIK_DIR=%~dp0 | |
SET FIELDS_PATH=%1 | |
echo %FIELDS_PATH% | |
SET DEFAULT_PROJECT=%FIELDS_PATH%\default.qrs | |
IF EXIST %DEFAULT_PROJECT% ( | |
SET PROJECT_TYPE=xml |
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 | |
# Usage: unix_scr.sh <path to fields dir> <path to js file> | |
TRIK_DIR=${0%/*} | |
FIELDS_PATH=$1 | |
DEFAULT_PROJECT=$FIELDS_PATH/1.qrs | |
if [ -f "$DEFAULT_PROJECT" ]; then | |
PROJECT_TYPE=xml | |
else | |
PROJECT_TYPE=qrs | |
fi |
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
//rgb32 | |
var photo = getPhoto(); | |
brick.display().show(photo, 160, 120, "rgb32"); | |
script.wait(5000); | |
//rgb888 | |
pic = [] | |
photo = getPhoto(); | |
l = photo.length; | |
for (i = 0; i < l; i++) { |
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 static java.lang.Math.*; | |
public class GaussSmooth { | |
private static double gauss(double sigma, double x) { | |
double expVal = -0.5 * (pow(x, 2) / pow(sigma, 2)); | |
return exp(expVal); | |
} | |
private static double[] gaussKernel1d(double sigma, int lw) { |
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
var time = 2000; | |
var cpr = [64, 64, 64, 64]; | |
var countTicks = function(motorPort, encoderPort, time) { | |
var motor = brick.motor(motorPort); | |
var encoder = brick.encoder(encoderPort); | |
var encBegin = encoder.readRawData(); | |
motor.setPower(100); | |
script.wait(time); |
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
var pic_large = [0x00,0x00,0x01,0x6a,0x68,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xac,0xac,0xa8,0xa8,0xa8,0xa8,0xa8,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xcc,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd4,0xd4,0xd4,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd4,0xd4,0xd4,0xd4,0xd4,0xd4,0xd4,0xd4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0x |