Can this be made with an imp?


Ok, I have been working on a project for a little while now but excited to possibly launch on Imp instead.

Can my imp do the following:

  1. Physical button pressed
    a.) Briefly turns on Pin 9
    b.) Sends confirmation message to Agent
    c.) Checks status of sensor on Pin 8
    d.) Sends Results to Agent
    e.) Imp receives command from Agent to briefly turn on Pin 7
    f.) Waits for further commands from Agent or from physical button.

  2. Agent
    a.) Receives confirmation from imp
    b.) Sends confirmation to a website database somehow (Post / Get?)
    c.) Sends sensor data to a website database somehow
    d.) Agent receives command from website somehow (agent url with parameter?)
    e.) Agent sends command to imp to briefly turn on pin 7

I believe that I understand that most of this can be done out of the box. But if I want the agent to automatically send information to a website database, can this be done? I know I will need some kind of script or coding to receive the message, but can the agent initiate this data send?

Thank you.

Can the agent send the information to your website database whenever someone presses the “physical button”? If so, that can be done.

On the reverse side, a script (server-side PHP for example) can send things to the agent at any time, either triggered by a user on the website, or a cron job that is scheduled to run at certain times on the webhost server.

On the imp device side, your imp is sending things to the agent and looking for a reply (or command as you call it). On the agent side, he is taking what the imp is giving him and sending it off to a website and looking for a reply (or command/data). When agent gets that, he sends a command to the imp.

The agent is “the middle man” between the imp and the internet website.

It looks like you’re doing a lot of ‘hand-shaking’ to make sure things get sent back and forth. Are you able to tell us more about your project and what it will be doing? And I happen to be experienced on the PHP (server-side) end of it, if you need any help with that.