Things used in this project

Hardware components:
S975 g000 2100 c2 3
UDOO QUAD
brain of dooUcoffee
×1
Udoo vk 7t 1 1
UDOO 7" Touch LCD for UDOO NEO, DUAL and QUAD
×1
Hand tools and fabrication machines:
Lasercutter
Laser cutter (generic)
3drag
3D Printer (generic)

Schematics

Operating Summary
DooUcoffee basic operating
Schema a blocchi1 mbchhdtp3j
Thompson Wafer dispenser
This simple diagram explains the operation of the distributor waffles,
Thompson dyagram aqutxfdmp8
Motor Board
board to control the milk and chocolate despenser engines
Controllo motori xbdchxmusq
Relays Board
board to control the relays for the mechanical organs
Scheda rele wosegbvghx

Code

Demo!C/C++
udoo demo code for Dooucoffee
#include "variant.h"
#include <stdio.h>
#include <adk.h>

// pompe 
int pompa1 = 8;
int pompa2 = 9;

//motori
int motoreLatte = 5;
int motoreMixer = 4;
int motoreCacao = 3;

//elettrovalvole
int elettrovalvolaBianca = 6;
int elettrovalvolaNera = 7; 

char descriptionName[] = "ArduinoADK_2"; // Accessory descriptor. It's how Arduino identifies itself to Android.
char modelName[] = "UDOO_ADK";           // your Arduino Accessory name (Need to be the same defined in the Android App)
char manufacturerName[] = "Aidilab";     // manufacturer (Need to be the same defined in the Android App)

// Make up anything you want for these
char versionNumber[] = "1.0";            // version (Need to be the same defined in the Android App)
char serialNumber[] = "1";
char url[] = "http://www.udoo.org";      // If there isn't any compatible app installed, Android suggest to visit this url

USBHost Usb;
ADK adk(&Usb, manufacturerName, modelName, descriptionName, versionNumber, url, serialNumber);

#define RCVSIZE 128
uint8_t buf[RCVSIZE];
uint32_t bytesRead = 0;

void setup()
{
    Serial.begin(115200);   

    //motori
    pinMode(motoreLatte,OUTPUT);
    pinMode(motoreMixer,OUTPUT);
    pinMode(motoreCacao,OUTPUT);
    
    //pompe
    pinMode(pompa1,OUTPUT);
    pinMode(pompa2,OUTPUT);
    
    //elettrovalvole
    pinMode(elettrovalvolaBianca,OUTPUT);
    pinMode(elettrovalvolaNera,OUTPUT);
    delay(500);
    
    Serial.println("UDOO ADK demo start...");
    
}

void loop()
{
    // preparazione scheda relè e motori  
    digitalWrite(elettrovalvolaBianca,HIGH);
    digitalWrite(elettrovalvolaNera,HIGH);                
   
    digitalWrite(pompa1,HIGH);
    digitalWrite(pompa2,HIGH);

    digitalWrite(motoreLatte,HIGH);
    digitalWrite(motoreCacao,HIGH);
    digitalWrite(motoreMixer,HIGH);
    
    // inizio programma      
    Usb.Task();
     
    if (adk.isReady()) {
      adk.read(&bytesRead, RCVSIZE, buf);// read data into buf variable
      if (bytesRead > 0) {
        switch(parseCommand(buf[0])){
          
            case 1:  // CAFFE
            
                //controllo elettrovalvole
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,HIGH);
            
                //controllo pompe
                digitalWrite(pompa1,LOW);
                digitalWrite(pompa2,LOW);
                delay(20000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);
                break;
                
            case 2: // CAFFE_LUNGO
            
                //controllo elettrovalvole
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,HIGH);
            
                //controllo pompe
                digitalWrite(pompa1,LOW);
                digitalWrite(pompa2,LOW);
                delay(30000);
                digitalWrite(pompa1,HIGH);                 
                digitalWrite(pompa2,HIGH);
                break;
                
            case 3: // CAPPUCCINO
            
                //controllo elettrovalvole per parte di caffè
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,HIGH);
            
                //controllo pompe per parte di caffè
                digitalWrite(pompa1,LOW);
                digitalWrite(pompa2,LOW);
                delay(20000);
                digitalWrite(pompa1,HIGH);                 
                digitalWrite(pompa2,HIGH);

                //controllo elettrovalvola per parte di latte 
                digitalWrite(elettrovalvolaNera,LOW);
                digitalWrite(elettrovalvolaBianca,HIGH);
                
                //accenzione motori per parte di latte 
                digitalWrite(motoreLatte,LOW);
                //delay(2000); 
                digitalWrite(motoreMixer,LOW);

                //controllo pompa per parte di latte               
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);                
                delay(5000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spegnimento motori per parte di latte                                                 
                digitalWrite(motoreLatte,HIGH);
                digitalWrite(motoreMixer,HIGH);
                
                break;
                
            case 4: // LATTE
            
                //controllo elettrovalvole
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,LOW);

                //accenzione motori
                digitalWrite(motoreLatte,LOW);                 
                digitalWrite(motoreMixer,LOW);
            
                //controllo pompe
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(5000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spegnimento motori per parte di latte                                                 
                digitalWrite(motoreLatte,HIGH);
                digitalWrite(motoreMixer,HIGH);
                
                break;
                
            case 5: // CIOCCOLATO
            
                //controllo elettrovalvole
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,LOW);

                //accenzione motori
                digitalWrite(motoreCacao,LOW);
                delay(2000); 
                digitalWrite(motoreMixer,LOW);
            
                //controllo pompe
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(5000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spegnimento motori per parte di latte                                                 
                digitalWrite(motoreCacao,HIGH);
                digitalWrite(motoreMixer,HIGH);
                
                break;
                
            case 6: // CIOCCOLATO_LATTE
            
                //controllo elettrovalvole
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,LOW);

                //accenzione motori parte cacao
                digitalWrite(motoreCacao,LOW);
                delay(2000); 
                digitalWrite(motoreMixer,LOW);
            
                //controllo pompe parte cacao
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(4000);                
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spengimento motore parte cacao
                digitalWrite(motoreCacao, HIGH);

                //accenzioine motore parte latte
                digitalWrite(motoreLatte,LOW);
                delay(2000);

                //controllo pompe parte latte
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(5000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spegnimento motori per parte di latte                                                 
                digitalWrite(motoreLatte,HIGH);
                digitalWrite(motoreMixer,HIGH);
                
                break;
                
            case 7: // MOCACCINO
                //controllo elettrovalvole parte caffè
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,HIGH);
            
                //controllo pompe parte caffè
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(20000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //controllo elettrovalvole parte latte e cacao
                digitalWrite(elettrovalvolaBianca,HIGH);
                digitalWrite(elettrovalvolaNera,LOW);

                //accenzione motori parte cacao
                digitalWrite(motoreCacao,LOW);
                delay(2000); 
                digitalWrite(motoreMixer,LOW);
            
                //controllo pompe parte cacao
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(4000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spengimento motore parte cacao
                digitalWrite(motoreCacao, HIGH);

                //accenzioine motore parte latte
                digitalWrite(motoreLatte,LOW);
                delay(2000);

                //controllo pompe parte latte
                digitalWrite(pompa1,LOW);                 
                digitalWrite(pompa2,LOW);
                delay(5000);
                digitalWrite(pompa1,HIGH);
                digitalWrite(pompa2,HIGH);

                //spegnimento motori per parte di latte                                                 
                digitalWrite(motoreLatte,HIGH);
                digitalWrite(motoreMixer,HIGH);
               
                break;
                
            default:
                break;
        }
      }
    } else {
      
      //controllo elettrovalvole      
      digitalWrite(elettrovalvolaBianca,HIGH);
      digitalWrite(elettrovalvolaNera,HIGH);    
            
      //controllo pompe
      digitalWrite(pompa1,HIGH);
      digitalWrite(pompa2,HIGH);

      //spegnimento motori
      digitalWrite(motoreLatte,HIGH);
      digitalWrite(motoreCacao,HIGH);
      digitalWrite(motoreMixer,HIGH);
     
    }  
    
    delay(10);
}

// the characters sent to Arduino are interpreted as ASCII, we decrease 48 to return to ASCII range.
uint8_t parseCommand(uint8_t received) {
  return received - 48;
}

Credits

Dd317d98 2d48 42fd b068 26bfc63a32df qdyv4tzbn6
Roberto Galletti

Roberto 2oyears Students, Elettronics e Robotics at Sarrocchi in Siena :)

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

A Sudoku Solver's Robot
Advanced
  • 2,414
  • 16

Full instructions

Sudoku-robot is a robot that solves and fills Sudoku grids!

New Electronic Music Instrument Design
Advanced
  • 1,140
  • 7

A new piece for percussion quartet seeks to bring physicality to electronic music using two custom musical instruments.

Power Lunch
Advanced
  • 404
  • 8

Full instructions

An insulated food container divided into two sections by a thermoelectric cooler module for quickly heating one side and cooling the other.

Power Lunch

5 members

Sigfox Texting with SiPy
Advanced
  • 1,912
  • 10

Full instructions

Send text messages without any SIM card using the SiPy by Pycom and the Sigfox network!

Portal VR
Advanced
  • 576
  • 47

Work in progress

Portal Game in Augmented reality.

Portal VR

Team Portal

Voice Controlled Home Automation Prototype
Advanced
  • 346
  • 2

Control your home appliances with your voice.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login