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> | |
<meta name="description" content="jquery game" /> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<meta charset=utf-8 /> | |
<title>jquery game</title> | |
</head> | |
<body> | |
<div id="score">0</div> |
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
from scene import * | |
from random import random | |
class MyScene (Scene): | |
def setup(self): | |
# This will be called before the first frame is drawn. | |
# Set up the root layer and one other layer: | |
longText = "This is an example of a long text string that needs to be word wrapped and displayed as a multiline body of text. This is an example of a long text string that needs to be word wrapped and displayed as a multiline body of text." | |
self.root_layer = Layer(self.bounds) |
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
from scene import * | |
import requests | |
class MyScene (Scene): | |
def setup(self): | |
# This will be called before the first frame is drawn. | |
pass | |
def draw(self): | |
# This will be called for every frame (typically 60 times per second). |
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
// viewing errors | |
// this line has an error in it | |
let myVar, = 10; | |
// using the console | |
console.log("hi"); | |
console.log(myVar); | |
// variable set a value + case | |
// this line has an error in it |
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
/* | |
Set the brightness of an LED with a potentiometer | |
Use a momentary switch to turn the LED on (at the brightness set by pot) or off | |
*/ | |
// These constants won't change. They're used to give names | |
// to the pins used: | |
const int analogInPin = A1; // Analog input pin that the potentiometer is attached to | |
const int analogOutPin = 3; // Analog output pin that the LED is attached to | |
const int buttonPin = 2; // the number of the pushbutton pin |
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
/* | |
Set the brightness of an LED with a potentiometer | |
Use a momentary switch to toggle the LED on (at the brightness set by pot) or off | |
Toggle happens each time the button is pressed to the ON position | |
*/ | |
// These constants won't change. | |
const int analogInPin = A1; // Analog input pin that the potentiometer is attached to | |
const int analogOutPin = 3; // Analog output pin that the LED is attached to | |
const int buttonPin = 2; // the number of the pushbutton pin |
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
/* | |
Arduino Function Example 1 - BlinkLed1 | |
Blinks an LED - part of a series to experiment with functions | |
Creative Technology Course by Philip van Allen - ArtCenter College of Design | |
*/ | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
// initialize digital pin 13 as an output. | |
pinMode(13, OUTPUT); |
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
/* | |
Arduino Function Example 2 - BlinkLed2 | |
Blinks an LED - part of a series to experiment with functions | |
Creative Technology Course by Philip van Allen - ArtCenter College of Design | |
*/ | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
// initialize digital pin 13 as an output. | |
pinMode(13, OUTPUT); |
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
/* | |
Arduino Function Example 3 - BlinkLed3 | |
Blinks an LED - part of a series to experiment with functions | |
Creative Technology Course by Philip van Allen - ArtCenter College of Design | |
*/ | |
const int LED1 = 13; | |
const int LED2 = 5; | |
// the setup function runs once when you press reset or power the board |
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
/* | |
Arduino Function Example 4 - Range | |
Gets a range from analogWrite - part of a series to experiment with functions | |
Creative Technology Course by Philip van Allen - ArtCenter College of Design | |
*/ | |
const int sensor = A0; | |
int range = 0; | |
// the setup function runs once when you press reset or power the board |
OlderNewer