Top Internet of Things Daily & Weekly

“Internet-controlled” Nespresso Machine

  • Using a chatbot and a Nespresso machine to make coffee remotely.
  • So I decided to use a Particle Photon to automate the coffee making process.
  • The firm ware receives commands such as warm or make coffee and moves the servo
  • stringify ( myResponse , true , 2 )); }, function ( err ) { output ( ‘An error occurred:’ , err ); }); myResponse = new MyResponse ( “Warming coffee machine for you” , “Coffee Machine Being Warmed” , “Coffee Machine” ); } else if ( hook .
  • log ( “success called warmcoffee succesfuly” ); // output(‘Function called succesfully:’, data); myResponse = new MyResponse ( “Warming coffee machine for you” , “Coffee Machine Being Warmed” , “Coffee Machine” ); hook .

Using a chatbot and a Nespresso machine to make coffee remotely. . Find this and other hardware projects on Hackster.io.

@evankirstel: “Internet-controlled” Nespresso Machine on @hacksterio #IoT

I enjoy drinking espresso in the morning right after waking up, however I don’t like waiting for it to cool before drinking. So I decided to use a Particle Photon to automate the coffee making process.

To take it further I integrated it with API.ai and created a chat bot which I can ask to prepare coffee for me in the morning or before I arrive home. It can also be integrated to IFTTT so the coffee machine would warm up the moment I park in my drive way.

I’ve added the steps on how to build it in 3 entries on my WordPress blog

int servoPin = D0 ; Servo myServo ; int servoPos = 0 ; int servoOn = D7 ; void setup () { pinMode ( servoOn , OUTPUT ); myServo . attach ( servoPin ); Particle . function ( ” press ” , press ); Particle . function ( “servo” , servoControl ); Particle . function ( “makecoffee” , makecoffee ); Particle . function ( “warmmachine” , warmmachine ); digitalWrite ( servoOn , LOW ); } void loop () { // myServo.write( 100 ); // delay(2000); // myServo.write( 120 ); // delay(3500); } int servoControl ( String command ) { digitalWrite ( servoOn , HIGH ); // Convert int newPos = command . toInt (); // Make sure it is in the right range // And set the position servoPos = constrain ( newPos , 0 , 180 ); // Set the servo myServo . write ( servoPos ); digitalWrite ( servoOn , LOW ); // done return 1 ; } int press ( String command ) { digitalWrite ( servoOn , HIGH ); myServo . write ( 130 ); delay ( 2000 ); myServo . write ( 150 ); delay ( 1500 ); myServo . write ( 125 ); delay ( 1000 ); digitalWrite ( servoOn , LOW ); return 1 ; } int makecoffee ( String command ) { digitalWrite ( servoOn , HIGH ); myServo . write ( 125 ); delay ( 2000 ); myServo . write ( 150 ); delay ( 1500 ); myServo . write ( 125 ); delay ( 3000 ); myServo . write ( 125 ); delay ( 2000 ); myServo . write ( 150 ); delay ( 1500 ); myServo . write ( 125 ); delay ( 1000 ); digitalWrite ( servoOn , LOW ); return 1 ; } int warmmachine ( String command ) { digitalWrite ( servoOn , HIGH ); myServo . write ( 125 ); delay ( 2000 ); myServo . write ( 150 ); delay ( 1500 ); myServo . write ( 125 ); delay ( 1000 ); digitalWrite ( servoOn , LOW ); return 1 ; }

“Internet-controlled” Nespresso Machine