Skip to content

Instantly share code, notes, and snippets.

@carlynorama
carlynorama / IntelGalileoSDTestingFile.ino
Last active March 1, 2016 14:37
Use this file to see if writing to the SD card on the Intel Galileo Board works for you.
/*
// This code is to test SD Card function on an Intel Galileo Board
// It was complied from various examples which can be found:
//
// https://communities.intel.com/thread/46635
// https://communities.intel.com/message/229074
// http://arduino.cc/en/Reference/SD
// http://forum.arduino.cc/index.php?topic=57460.0
//
// Carlyn Maw 2014
@carlynorama
carlynorama / createTestFiles.sh
Last active August 29, 2015 13:56
These are the commands for creating SD Library test files on the Intel Galileo main file structure.
#commands once logged in to the Intel Galileo Board
#I ran to create test files.
df -h
cd /media/realroot
ls -l
echo "go away" > deleteMe_01.txt
cat deleteMe_01.txt
echo "go away" > deleteMe_02.txt
echo "go away" > deleteMe_03.txt
echo "go away" > deleteMe_04.txt
@carlynorama
carlynorama / WiFiChecker.ino
Last active July 28, 2016 22:28
This stand alone sketch checks the WiFi functionality of an Arduino board with the WiFi shield or an Intel Galileo board.
/*
// This code is to test WiFi function on Arduino Boards
// It was complied from various examples which can be found:
//
// http://arduino.cc/en/Tutorial/ConnectNoEncryption
// http://arduino.cc/en/Tutorial/ConnectWithWPA
// http://arduino.cc/en/Tutorial/WiFiWebClientRepeating
// http://arduino.cc/en/Reference/WiFiClientConnect
//
// Carlyn Maw 2014
@carlynorama
carlynorama / IntelGalileoConnectionSettings.stc
Created March 10, 2014 23:12
CoolTerm Settings for IntelGalileo
Port = YOURPORT
BaudRate = 115200
DataBits = 8
Parity = N
StopBits = 1
FlowControlCTS = false
FlowControlDTR = false
FlowControlXON = false
DTRDefaultState = true
RTSDefaultState = true
@carlynorama
carlynorama / test_return18.py
Created March 11, 2014 01:14
Always returns the number 18 for checking whether a Python script call is working.
# Returns 18
# Place this file in the top level of your Galileo's SD card.
print len("I should return 18")
//detivative of code posted here: https://www.sparkfun.com/news/1360
//discussion of project here: http://blog.carlynorama.com/tag/intelgalileo/
//RELEVANT CHANGES FROM OC COMMENTED IN ALL CAPS
int getEmailCount()
{
//SAME VARIABLES
int digits = 0;
char temp[10];
int emailCnt = 0;
@carlynorama
carlynorama / excel_formulas_for_grading.txt
Created May 8, 2014 15:07
Excel Formulas for Grading
#for translating letter grades when the students number grade is in cell
#A9 and there are named cells (coA, coB, coC, coD) with the cutoffs
=IF($A$9>=coA,"A",IF($A$9>=coB,"B",IF($A$9>=coC,"C",IF($A$9>=coD,"D","F"))))
@carlynorama
carlynorama / python_virtualenv_setup.sh
Last active August 29, 2015 14:03
How to set up a new django project on a mostly fresh install of Mac OSX
#!/bin/sh
#assumes Xcode/gcc and FireFox installed
#install hombrew
#ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
#brew doctor
brew install python3 #includes pip3
pip3 install virtualenv
mkdir -p ~/$PATH/$SITENAME
mkdir -p ~/$PATH/$SITENAME/database
@carlynorama
carlynorama / create_django_branch.sh
Last active August 29, 2015 14:03
How to connect to the repo July 14 2014
#assumes Mac OS X 10.9 with Xcode Command line tools and FireFox installed
#install hombrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
#install python 3 in homebrew's path and get virtualenv for it
brew install python3 #includes pip3
pip3 install virtualenv
#------ MICHELLE START HERE ---------------#
@carlynorama
carlynorama / make_blank_tiles.sh
Last active May 30, 2018 16:04
Making place holder tiles for a montage
#!/bin/bash
#Creates blank white tiles for a 16x8 grid
#white, 1204x864 unless otherwise specified.
#Using hex colors requires quotes. ie. "#F0F0F0"
#REQUIRES IMAGEMAGICK.
#the first parameter passed to the shell script
#will be the width of the grid needing tiles
WIDTH=$1;