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
Software apps and online services:
Logo things yummo7uv2y
Google Developers Android Things
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 :)

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

Home Automation Control Panel
Advanced
  • 10,583
  • 52

Work in progress

A touchscreen control panel for home IOT devices. Arduino, Raspberry Pi, RFM69, mqtt and more.

Dash Button Santa with Arduino MKR1000
Advanced
  • 423
  • 4

Send information to Santa Claus about the status of the gift request.

Ultrasonic Sight
Advanced
  • 170
  • 0

Protip

Mobile electronical device for blind and visual impaired people mobility.

KIDS personal assistant
Advanced
  • 101
  • 1

Work in progress

This is a kid PA project similar to Alexa and Google home. It can answer anything about a person or place, tells meaning & spells any word.

Portal VR
Advanced
  • 314
  • 46

Work in progress

Portal Game in Augmented reality.

Portal VR

Team Portal

Velo Bling-Bling
Advanced
  • 6,397
  • 144

Full instructions

LED lights for bicycle wheels. 16 multi color LEDs on both PCB sides. Displays images and dynamic info like speed. BLE and USB interface.

ProjectsCommunitiesContestsLiveJobsBetaFree StoreBlogAdd projectSign up / Login
Respect project