Public projects 1

Smart Shower Gadget

by Pipo Automation

  • 116 views
  • 0 comments
  • 0 respects

Toolbox 2


Respected projects 3

Robot Arm with Controller

Project tutorial by HomeMadeGarbage

  • 37,904 views
  • 25 comments
  • 231 respects

Walaarm: Walabot-Powered Robotic Arm

Project in progress by Md. Khairul Alam

  • 7,048 views
  • 0 comments
  • 38 respects

Alexa Controlled LEDs Through Arduino Yún

Project tutorial by Ben Eagan

  • 24,217 views
  • 10 comments
  • 28 respects

Comments 1

  • Arduino-Powered Smart Light (Works with Amazon Echo) almost 4 years ago

    Hi guys! If you see the code for the lambda function, could you tell me how to modify 2 or more endpoints in the same case, e.g. there's the case of Light On and he set the variable to 1, if i want to change other endpoint in that case. How could be done? I tried something like this but modify each endpoint at time and not together.
    case "LaunchRequest" :
    var endpoint1 = "https://api.thingspeak.com/update?api_key=7AVYH203044IJG3T&field1=1"
    https1.get(endpoint1, function (result1){console.log('Success, with: ' +
    result1.statusCode);
    context.succeed(generateResponse(buildSpeechletResponse("Welcome to the Smart
    Shower Gadget Skill, What kind of shower do you desire today? Cold, fresh, warm, hot
    or very hot?",false),{})) }).on('error', function (err1){console.log('Error, with: ' +
    err1.message); context.done("Failed")});
    var endpoint2 = "https://api.thingspeak.com/update?api_key=7AVYH203044IJG3T&field2=15"
    https2.get(endpoint2, function (result2){console.log('Success, with: ' +
    result2.statusCode); }).on('error', function (err2){console.log('Error, with: ' +
    err2.message); context.done("Failed")});

        break;
    
Add projectSign up / Login