What is the process flow

I am just imagining the limits on how far one can go using arduino and internet.

"Assume, a vendor kiosk/automat machine is powered by arduino. To draw my candies from the automat, I need to pay for the candies using paypal to their website through my mobile. Once the payment is confirmed, the website turns-on the servo to drop the candies which I can collect."

So, this is the scenario. This may sound non-sense. I am just trying to gather knowledge on how this thing would work. I have to accept, that I am yet to do my home work (I have to say I don't know where to start, how to proceed). But first I need to know what processes are involved to make the above story work. I would like to know if this is actually feasible?

Regards

At a minimum the Arduino in the vending machine will need a network connection. This can be done with an Ethernet Shield if there is an Ethernet router in reach.

The vendor needs a vendor account with PayPal and a web server. The web server would probably use the Internet to connect with the vending machine. The user connects to the web server, the web server requests payment from PayPal, PayPal gets authentication from the user, PayPal tells that website that the transaction is complete, and the website tells the vending machine to vend.

Of course without authentication between the website and the vending machine anyone who can connect to the Internet could tell the vending machine to spit out candy. :slight_smile:

Thanks @JohnWasser. So, it is feasible. The process you mentioned, I have some understanding about it. Its the algorithm between the machine and server than confuses me. Say for example, if the machine has to spit a candy every hour between 6:00 to 18:00, would you recommend using millis() or RTC. Does interrupts come into play?

AlleSl3Icut:
Thanks @JohnWasser. So, it is feasible. The process you mentioned, I have some understanding about it. Its the algorithm between the machine and server than confuses me. Say for example, if the machine has to spit a candy every hour between 6:00 to 18:00, would you recommend using millis() or RTC. Does interrupts come into play?

Yes it's doable.

As an asside. I recall some time ago, one of the universities had a scheme where vending machines would accept payment from mobile phones. So you could simply send a text message to the machine for the item you want. The machine will dispense the product and you get charged through your mobile account.

That was quite a few years ago but I was expecting these type of machines to be everywhere by now, yet I've heard no more about it. I suspect they ran into some major issues.

Is there a https client for arduino? I could not find one and one would be required for these types of transactions

AlleSl3Icut:
would you recommend using millis() or RTC.

If you want things to work according to clock time you need an RTC. The Arduino millis() does not keep time that accurately.

Does interrupts come into play?

Almost certainly NOT. interrupts are for things that need to be timed at the microsecond level.

As a general comment these are fine details that are almost irrelevant at this stage of your planning.

It might be worth considering whether an Arduino or a RaspberryPI would be most suitable for a project like this. The PI would make sophisticated security coding much easier.

...R