Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // draw the led wiredwires using turtle
- function drawProng(x,y) {
- hide();
- penUp();
- moveTo(x,y);
- turnTo(180);
- penWidth(5);
- penRGB(130,135,136);
- penDown();
- moveForward(50);
- }
- onEvent("start", "click", function () { //change to translation sceen and draw the led
- setScreen("screen1");
- drawProng(170,60);
- drawProng(150,60);
- });
- //morse code functions.
- function wait(milliseconds){
- setTimeout(function() {hideElement("placeholder")},milliseconds);
- }
- function long(){
- showElement("flash");
- wait(1500); //hold for 1500m and then turn off.
- hideElement("flash");
- wait(1500); // use my wait function for 1500m before going onto next morse
- }
- function short(){
- showElement("flash");
- wait(500)
- hideElement("flash"); //hold for 500m and then turn off
- wait(500); // wait 500m before going onto next morse.
- }
- function next() {
- wait(1500)
- }
- function space(){
- wait(3500);
- }
- //Text box handling portion (this is going to be a nightmare)
- function letterA(){
- short();
- long();
- next;
- }
- var A = letterA()
- onEvent("submit","click", function() {
- getText("textBox")
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement