Jim's
Tutorials

Spring 2017
course
navigation

Getting ready for spring break

So this week I got some more work done on the compiler. I got correct wrapping for PROGMEM variables. I also can a series of cases to figure out what I still needed to fix/implement.
First, here is an example of the first two projects form SparkFun's Inventor's Guide:
#/ blink.minno by Logan Davis A simple blink program. 3/7/17 | Minno V"too early to tell" | devOS: macOS /# let outputPin : int = 13; //set pin for reference def setup none -> none { //set mode to output pinMode outputPin OUTPUT; } def loop none -> none { // blink on and off with 1 sec intervals digitalWrite outputPin HIGH; delay 1000; digitalWrite outputPin LOW; delay 1000; digitalWrite outputPin LOW; }
What it outputs: const PROGMEM int outputPin = 13 ; void setup () { pinMode(pgm_read_word(&outputPin),OUTPUT) ; } void loop () { digitalWrite(pgm_read_word(&outputPin),HIGH) ; delay(1000 ) ; digitalWrite(pgm_read_word(&outputPin),LOW) ; delay(1000 ) ; digitalWrite(pgm_read_word(&outputPin),LOW) ; }
And the second: #/ potReader.minno by Logan Davis A simple blink that reads delay time from a 1k pot. 3/7/17 | Minno V"too early to tell" | devOS: macOS /# let sensorPin: int = 0; let ledPin: int = 13; def setup none -> none { pinMode ledPin OUTPUT; } def loop none -> none { let sensorVal : mutable int = analogRead sensorPin; digitalWrite ledPin HIGH; delay sensorVal; digitalWrite ledPin LOW; delay sensorVal; } Output: const PROGMEM int sensorPin = 0 ; const PROGMEM int ledPin = 13 ; void setup () { pinMode(pgm_read_word(&ledPin),OUTPUT) ; } void loop () { int sensorVal = analogRead(pgm_read_word(&sensorPin)) ; digitalWrite(pgm_read_word(&ledPin),HIGH) ; delay(sensorVal) ; digitalWrite(pgm_read_word(&ledPin),LOW) ; delay(sensorVal) ; }
The things to code over break are the following:
As for the paper, I just need to finish a little section of Making Minno. After that It should just be revising and proof reading. I hope to get through 2 drafts of both papers each by the end of spring break.