0% found this document useful (0 votes)
116 views5 pages

Dif

This document contains code for an Arduino project that includes code to interface with a Talkie text-to-speech module, define input and output pins, initialize an LCD display, and have the module speak a weather report on startup that includes wind speed and direction. It imports libraries for the Talkie module, LCD display, digital input/output and includes pin definitions for the inputs, output, speaker and LCD. In setup, it configures the pins, initializes serial and LCD display, and has the Talkie module speak the weather report.

Uploaded by

Saraswathi Ragam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views5 pages

Dif

This document contains code for an Arduino project that includes code to interface with a Talkie text-to-speech module, define input and output pins, initialize an LCD display, and have the module speak a weather report on startup that includes wind speed and direction. It imports libraries for the Talkie module, LCD display, digital input/output and includes pin definitions for the inputs, output, speaker and LCD. In setup, it configures the pins, initializes serial and LCD display, and has the Talkie module speak the weather report.

Uploaded by

Saraswathi Ragam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

TH

#include <Arduino.h>
#include <Talkie.h>
#include "Talkie.h"
#include "Vocab_US_Large.h"
#include <Vocab_US_Large.h>
#include "Vocab_US_Clock.h"
#include "Vocab_Special.h"
#include <LiquidCrystal.h>
//pin3 of lcd has potentiometer
LiquidCrystal lcd(43, 45, 47, 49, 51, 53);
#define speaker 5
#define led 31
#define led1 33
#define led2 35
#define mode 37
#define cancel 39
#define inpint 22
#define inpini 24
#define inpinm 26
#define inpinr 28
#define inpinl 30
#define inpine 32
#define inpin1 34
#define inpin2 36
#define inpin3 38
#define inpin4 40
#define inpin5 42
#define inpin6 44
#define inpin7 46
#define inpin8 48
#define potent A0
const int numRows = 2;
const int numCols = 16;
int read_value = 0;
int volume = 0;
Talkie voice;
#define VERSION_EXAMPLE "1.2"
void setup() {
pinMode(led,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led1,OUTPUT);
pinMode(mode, INPUT);
pinMode(cancel,INPUT);
pinMode(inpint, INPUT) ;
pinMode(inpini, INPUT) ;
pinMode(inpinm, INPUT) ;
pinMode(inpinr, INPUT) ;
pinMode(inpinl, INPUT) ;
pinMode(inpine, INPUT) ;
pinMode(inpin1, INPUT) ;
pinMode(inpin2, INPUT) ;
pinMode(inpin3, INPUT) ;
pinMode(inpin4, INPUT) ;
pinMode(inpin5, INPUT) ;
pinMode(inpin6, INPUT) ;
pinMode(inpin7, INPUT) ;
pinMode(inpin8, INPUT) ;
pinMode(speaker, OUTPUT);
lcd.begin(16, 2);
Serial.begin(115200);
#if defined(__AVR_ATmega2560__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

// voice.doNotUseUseInvertedOutput();
#if defined(CORE_TEENSY)
pinMode(6, OUTPUT);
digitalWrite(6,HIGH); //Enable Amplified PROP shield
#endif
voice.say(spc_GOOD);
voice.say(spc_MORNING);
voice.say(spPAUSE1);
voice.say(spc_THE);
voice.say(spc_TIME);
voice.say(spc_IS);
voice.say(spc_ELEVEN);
voice.say(spc_THIRTY);
voice.say(spc_SIX);
voice.say(spc_A_M_);
voice.say(spPAUSE1);
}

VCA

#include <Talkie.h>

#include <TalkieLPC.h>

#include <TalkieUtils.h>

#include <Vocab_Soundbites.h>

#include <Vocab_Special.h>

#include <Vocab_Toms_Diner.h>

#include <Vocab_US_Acorn.h>

#include <Vocab_US_Clock.h>

#include <Vocab_US_Large.h>

#include <Vocab_US_TI99.h>

#include <digitalWriteFast.h>

#include <Arduino.h>

#include <LiquidCrystal.h>

//pin3 of lcd has potentiometer

LiquidCrystal lcd(43, 45, 47, 49, 51, 53);

#define speaker 5

#define inpint 22

#define inpini 24

#define inpinm 26

#define inpinr 28

#define inpinl 30

#define inpine 32

#define inpin1 34
#define inpin2 36

#define inpin3 38

#define inpin4 40

#define inpin5 42

#define inpin6 44

#define inpin7 46

#define inpin8 48

#define potent A0

const int numRows = 2;

const int numCols = 16;

int read_value = 0;

int volume = 0;

Talkie voice;

void setup() {

pinMode(inpint, INPUT) ;

pinMode(inpini, INPUT) ;

pinMode(inpinm, INPUT) ;

pinMode(inpinr, INPUT) ;

pinMode(inpinl, INPUT) ;

pinMode(inpine, INPUT) ;

pinMode(inpin1, INPUT) ;

pinMode(inpin2, INPUT) ;

pinMode(inpin3, INPUT) ;

pinMode(inpin4, INPUT) ;

pinMode(inpin5, INPUT) ;
pinMode(inpin6, INPUT) ;

pinMode(inpin7, INPUT) ;

pinMode(inpin8, INPUT) ;

pinMode(speaker, OUTPUT);

lcd.begin(16, 2);

Serial.begin(115200);

#if defined(__AVR_ATmega2560__)

while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial

#endif

// Just to know which program is running on my Arduino

Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

#if defined(CORE_TEENSY)

pinMode(5, OUTPUT);

digitalWrite(5, HIGH);

#endif

voice.say(sp3_WIND);

voice.say(sp3_NORTHEAST);

voice.say(sp3_GUSTING_TO);

voice.say(sp3_FOURTY);

voice.say(sp3_MILES);

voice.say(sp3_PER);

voice.say(sp3_HOUR);

You might also like