Arduino_Tell_The_Fortune. New fun codes composed by Simon.

Simon spent most of the day coding, with a break to have his Chinese lesson. It turned out that he was composing his one codes. It was very frustrating when some of them didn’t work and gave complex error messages but several did. Here are two examples of his latest inventions:

// This will allow you to press a button to get a random number.
// The random module is effecting the random number.
// To see the random number, Click the Serial monitor above.
int random1 = A0;
int button = (digitalWrite, random1);

void setup(){

pinMode(random1, INPUT);
pinMode(button, INPUT);


void loop(){



// ask a question to the Arduino.
// The sound trigger triggers the circuit whenever someone asks a question.


int trigger = A0;

void setup(){

pinMode(trigger, INPUT);


void loop(){

Serial.println(“true” or”false”);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s