iOT Buddy problems

Yesterday I have got my imp and now I’m trying to control it from my phone.
I tried iOT buddy, but I can’t get it working.
This is the code that I’m using:

// Log the URLs we need server.log("Turn LED On: " + http.agenturl() + "?value=1"); server.log("Turn LED Off: " + http.agenturl() + "?value=0");

function requestHandler(request, response) {
try {
// check if the user sent led as a query parameter
if (“value” in request.query) {

  // if they did, and led=1.. set our variable to 1
  if (request.query.value == "1" || request.query.value == "0") {
    // convert the led query parameter to an integer
    local ledState = request.query.value.tointeger();

    // send "led" message to device, and send ledState as the data
    device.send("led", ledState); 
// send a response back saying everything was OK.
response.send(200, "OK");

} catch (ex) {
response.send(500, "Internal Server Error: " + ex);

// register the HTTP handler

led <- hardware.pin9;

// configure led to be a digital output

// function to turn LED on or off
function setLed(ledState) {
server.log("Set LED: " + ledState);

// register a handler for “led” messages from the agent
agent.on(“led”, setLed);

I’m attaching the configuration on my phone.

I would encourage you to use Pitchfork instead of IoT Buddy. (I wrote both, and both are free.) Pitchfork is set up much more nicely, and I have example code on my github page.

IoT-Buddy needs an update, but it may be a while until I get around to that. Thanks for using the programs though!

@jwehr, I tried pitchfork, it works perfectly!!!
But I need a custom design… I have a jailbroken iPhone 5s and a Mac, can I customize your app?

I don’t have the Pitchfork code posted, but I can. You don’t need to jailbreak your phone to develop iOS apps, but you do need to download Xcode and sign up for an Apple developer account, which runs $100/year.

$100/year is a lot for me (I have to do only one thing), any other way to to that?
I was reading on the net that there are workarounds to do that… can you give me the code of Pitchfork?

The project is currently in the middle of an update, but I’ll see if I have an older copy of the code that I can post. I’m not aware of any other ways to easily modify and compile code for iOS, but I haven’t looked.

That’s awesome! Thank you very much!!!

@jwehr, I’m trying to modify the layout of iOTBuddy, but I can’t find the part with the control panel… is it written into the code?

If you are using the code posted to GitHub, then the layout is in a storyboard file.

@jwerh I got it, thank you.
Did you managed to find an older version of Pitchfork?

Here is an older version…

@jwehr, I have modified Pitchfork and I did an hexapod controller, I’m attaching the image of it running on my phone (I didn’t bought the developer license).
I was wondering if there is a way to remove the popups when you press a button.

All of the popups are handled by the SVProgressHud library… they are extremely easy to use. Just do a search for them in the appropriate ViewController and I’m sure you’ll see what is going on. You can just comment those lines out. What are you using for an IDE?

So, I modified the app for the hexapod, now I’m trying to hack a Robosapiens V1. I have written the firmware and it’s working but I need more Buttons in pitchfork. I’m not an iPhone developer. Is there an easy way to modify pitchfork?
@jwehr, can you help me?

@cece99 I actually have an update to Pitchfork mostly complete should do what you want. There are now nine buttons that should accommodate more control, and I have broken out the GPS and accelerometer. I am in the process of moving the app under the umbrella of my new company, MakeDeck, and hopefully I’ll have the update ready soon. There have been a number of iOS updates since the last release and many of the libraries need to be updated.

@jwehr I actually need at least 25 buttons… Right now I’m 3d printing an enclosure for my imp, and then I’ll try to modify the source code of Pitchfork that I have.

Modding Pitchfork to have a 25 button control wouldn’t be hard, especially if you were hardcoding the buttons and agent URL. You could do it with a single view controller. I will be focusing on an ePaper app soon, but if you decide to go with Xcode, consider submitting the app to the app store. I’m sure others would like to use it. I bought a Robosapien for my niece for Christmas, but I haven’t done any hacking with it.

ePaper app?
I can’t submit the app to the app store because I don’t have the Apple license.

My company, MakeDeck is manufacturing the Vanessa ePaper display reference design. We are working on a web service so that you can send text, and also an iOS app to allow you to send images and pictures easily. ePaper is really cool beause of its low power applications, and a perfect combo with the Imp. We are trying to make it as easy to use as possible. Eventually I would like to have a display board that you can attach directly to an enclosure just like an LCD.

Vanessa on MakeDeck

I know MakeDeck because… you have retweeted my tweet :slight_smile: