ESPSMS(episode 1) – Basic Questions | Calculator


Hello techies…,

This the first episode of my series called ESPSMS. In this blog I will tell you how you can ask you assistant some basic questions and also do some basic calculations in it.So lets get started……

You can ask ESPSMS on those questions, which are inbuilt in its code. You can check out the questions which you can ask in the library called constants.h. I have taught esp some questions regarding its origin, it’s teacher etc….. You can asks questions like

who are you?

where are you from?

who is your teacher?

what is your aim?

etc… Now the question is how to do this.First we will learn making calculator because this doesn’t require any API and afterwards we will see how to made espsms answer basic questions.

Making Calculator

 

At first I thought to make calculator by API but why to make it complicated while we can make it simple by just using our arduino code. For Calculator, I just compared the string starting with “Calculate” and then given the string to a function called calci();

calculator

Inside that function, we are just separating first number, the sign and the second number on the basis of space between them. As you will study the library you will come to know everything.

In this calculator I have also attached the text of the maths sign along with sign itself. I mean to say is this,

const

so that you can write “Calculate 322 + 233” or “Calculate 322 plus 233” the result will be the same. So this is the most basic trick of our personal assistant ESPSMS. Moving towards the second trick.

Answering basic questions

This is something which involves making an API and than requesting it through our board.So first I decided some questions which may get asked to this new born assistant like who are you, where are you from etc…. So I already wrote its answer somewhere on the internet and then I made their API using thingspeak.com. Now if you don’t know how to make an API then kindly visit my blog on Fetching data from any website to know how to make an API. In that article I have shown step by step making an API.

Everytime you watch or read a new episode kindly upgrade your code as to access the tricks discussed in the episode.

 

You can download the code from here

 

2 Replies to “ESPSMS(episode 1) – Basic Questions | Calculator”

  1. example

    An impressive share! I have just forwarded this onto a co-worker who has been doing a little
    research on this. And he in fact bought me
    breakfast simply because I stumbled upon it for him…
    lol. So allow me to reword this…. Thank YOU for the meal!!
    But yeah, thanks for spending some time to discuss this
    subject here on your website.

  2. example

    Heya i’m for the first time here. I came across this board and I find It truly
    useful & it helped me out much. I hope to give something back
    and aid others like you aided me.

Leave a Reply

Your email address will not be published. Required fields are marked *