About The Happy Coder

This author has not yet filled in any details.
So far The Happy Coder has created 49 blog entries.
4 11, 2019

Traffic Lights

By |2019-11-04T15:48:21+00:004th November 2019|Arduino|

Code for the Arduino: int ledRed = 13; int ledAmber = 12; int ledGreen = 11; void setup() {   pinMode(ledRed, OUTPUT);   pinMode(ledAmber, OUTPUT);   pinMode(ledGreen, OUTPUT);   digitalWrite(ledAmber, LOW);   digitalWrite(ledGreen, LOW);   digitalWrite(ledRed, LOW); } void loop() {   digitalWrite(ledRed, HIGH);   digitalWrite(ledAmber, LOW);    digitalWrite(ledGreen, LOW);   delay(3000);     digitalWrite(ledRed, HIGH);   digitalWrite(ledAmber, HIGH);   digitalWrite(ledGreen, LOW);   delay(1000);   digitalWrite(ledGreen, HIGH);   digitalWrite(ledRed, LOW);     digitalWrite(ledAmber, LOW);   delay(3000);   digitalWrite(ledAmber, HIGH); [...]

1 11, 2019

Digital Doodle #6

By |2019-11-01T17:51:32+00:001st November 2019|Digital Art|

Code: function setup() {   createCanvas(800, 800)   background(255) } function draw() {   for(var i = 0; i < 500; i++)   {     stroke(random(50, 200), 0, 0, random(255))     strokeWeight(random(10))     line(width/4, height/4, random(width), random(height))  }   noLoop() }

1 11, 2019

Digital Doodle #5

By |2019-11-01T17:52:12+00:001st November 2019|Digital Art|

The code: function setup() {   createCanvas(800, 800)   background(0)   for(var i = 0; i < width; i++)   {     strokeWeight(random(2))     stroke(255, random(255))     line(width/2, height/2, random(width), random(height))   } } function draw() { }

1 11, 2019

Digital Doodle #4

By |2019-11-01T17:37:28+00:001st November 2019|Digital Art|

The code: function setup() {   createCanvas(800, 800)   background(0)   for(var i = 0; i < width; i++)   {     strokeWeight(0.5)     stroke(255)     line(i*2, random(0, height), i/2, random(height, 0))   } } function draw() { }

31 10, 2019

Digital Doodle #3

By |2019-11-01T17:53:36+00:0031st October 2019|Digital Art|

Code: function setup() {   createCanvas(800, 800)   background(245)   for(var i = 1; i < width/25; i++)   {     strokeWeight(10)     stroke(255 - i*10, 0, 0 + i*10)     line(25*i, 100, 25*i, height-100)   } } function draw() { }

31 10, 2019

WPV #1

By |2019-10-31T09:39:54+00:0031st October 2019|WPV|

This is where we plan to test the vehicle, eventually. Saunton Sands in North Devon near Barnstaple. The fun bit is the journey, learning new skills and finding solutions.

31 10, 2019

Digital Doodle #2

By |2019-11-01T17:54:21+00:0031st October 2019|Digital Art|

Code: function setup() {   createCanvas(800, 800)   background(245)   for(var i = 1; i < width/25; i++)   {     strokeWeight(10)     stroke(random(255), random(255), random(255))     line(25*i, 100, 25*i, height-100)   } } function draw() { }

6 10, 2019

Should driverless cars face a driving test?

By |2019-11-04T14:27:55+00:006th October 2019|AI, Robotics|

Driverless cars should face a driving test before they are allowed on the road. It would be an assumption that all cars are manufactured identically, so each car would have to pass its test before being allowed on the road. A bit like an MoT. This would be done yearly (like an MoT).  

23 08, 2019

#1 Internet of Things

By |2019-08-23T13:18:48+00:0023rd August 2019|IoT|

The Particle Photon connects with the Internet and communicates with another Particle Photon, a website or an app on a smartphone. Data can go both ways. You can turn a light on in your house with your phone or you can see what the temperature is in your living room in real time. These are just simple examples.