Quantcast
Channel: General - electric imp Forums
Viewing all 168 articles
Browse latest View live

pin.configure(PWM_OUT_STEPS, period, dutyCycle, stepCount)

$
0
0
Hi All,

So I've been using this line of code in my program: hardware.pin8.configure(PWM_OUT_STEPS, period, 0.5, 10);

My hope is that the led associated with the pin will blink "stepCount" number of times with the "period" variable.

i.e. If I put in 10 for stepCount, I want the led to blink 10 times with the period it's given.

Am I misunderstanding the function of stepCount?

Currently when I put in a number, the led blinks forever with that period and ignores the stepCount.

The exception being that if I use "1" as my StepCount, the LED just stays on.

Any help is much appreciated
Thanks!


sorting models in ide

$
0
0
Hi, is there anyway to sort inactive models in ide to show latest models first rather than by alphabet?
Thanks,
Ken

I'm in the UK - where can I get an Impee Nora?

$
0
0
I cannot seem to find a vendor willing to ship a Nora kit to the UK (the amazon.com outlet does not ship here, annoyingly).

Does anyone know how I can get one? I think this device would be ideal for a greenhouse atmosphere monitor and it would save me a lot of soldering!

MAC address substitution

$
0
0
A user of my imp-enabled product is unable to connect his device from home. We suspected that his router was blocking port 31314 but he is able to successfully telnet to imp.electricimp.com 31314 on the network in question. He ran wireshark, and found that the downstream communication from imp servers to his device has the wrong MAC address. The MAC ID of his imp is 0C-2A-69-0A-71-BB but the downstream communications are associated with a Cisco device with MAC ID C4-71-FE-73-1A-E2 (user has no such device). Any thoughts on what is going on?

Using Voice Recognition with Imp

SPI read.

$
0
0
Hi, I am trying to use an IMP to read temperature data from a microcontroller using the SPI bus. I am completely new to the imp world. Does anyone have any idea of how to achieve this. Also is there is any up to date tutorials on how to send that data to a website/mobile phone APP. If i could just get a general overview of this proceedure that would be much appreciated.

I presume it will be something like this-
configure SPI
set up variables
imp CS low
imp SPI read data
imp CS high
SPI data send to agent

agent send to url https\\.......
then this updates a html page. How to do this...


Thanks in advance

Lenny

Electric Imp App for WinPhone?

$
0
0
My and my buddies have used the electric imp app in android to bootstrap the device but I have winphone as OS and haven't found anything at the store. I've found this link but it looks quite shady. Thanks.

How to send a message in LUA language from ESP8266 to Electric Imp ?

$
0
0
I can successfully send a message from my first imp to my second one. Now I'm trying to write a simple program in the LUA language to send a message from an ESP8266 to the same Imp. Using this program on the ESP8266:

conn=net.createConnection(net.TCP, 0)
conn:on("connection",function(conn, payload)
conn:send("HEAD / HTTP/1.1\r\n"..
"Host: agent.electricimp.com/...agentID.... \r\n"..
"Accept: */*\r\n"..
"User-Agent: Mozilla/4.0 (compatible; esp8266 Lua;)"..
"\r\n\r\n")
end)

conn:on("receive", function(conn, payload) print(payload) conn:close() end)
conn:connect(80,'agent.electricimp.com')

I get this result from the Imp Agent:

HTTP/1.1 400 Bad Request
Content-Length: 181
Content-Type: text/html
Date: Fri, 18 Mar 2016 18:11:35 GMT
Server: nginx/1.4.6 (Ubuntu)
Connection: keep-alive

I'm at the limit of my knowledge on both LUA and HTTP. Can anybody tell me what's wrong with my LUA program or how to find out the cause of the "400 Bad Request" received from the Imp Agent ? Thanks in advance for any suggestions.



Sending a text

$
0
0
First, I am really enjoying this group. I have looked through 187 projects and tons of posts, but still feel lost. I am not a programmer or a hardware guy. I bought an Imp to do one thing, send a text message when I have a bird. I assist with bird banding to track migration and design bird traps. As an input to the Imp I can have either a switch closure or a +5V signal coming from the trap relay. Not sure which is best or which pins to use. I could really use help on which code or code snippets to use. I looked at the washing machine text project, but it’s still kind of over my head. I would just like a text to my phone that says “Bird in trap #1”, when the trap relay actuates.

So far I have blinked my Imp and got the device log to say “Hello from the device”, but that’s it. Any help or advice would be greatly appreciated.

Cheers,
Fritz

2 Imps go offline randomly, same connected router

$
0
0
For just over a week now I have had 2 imps deployed at a site, both connected to the same open router (no password). One is an 001/April and the other an 002. Both have dropped offline a few times, requiring a manual reboot (pull power cord, then plug back in) to get back online again. Each time this happened I knew the router was still available because the alternate device was continuing to post information to an online service.

Both Imps are running a modified version of the original Temp Bug code. They read thermistors then sleep (wakeinterval is set to "1") using:
imp.onidle( function() {
server.sleepfor(1 + WAKEINTERVAL_MIN*60 - (time() % (WAKEINTERVAL_MIN*60)));
});
I noticed that just before each time a device went offline I received a few "imp restarted, wi-fi outage" messages in the IDE.

What is the first and most logical thing to do to troubleshoot? Should I get make/model info on the router and forward to the folks at Electric Imp?

Android App for sending HTTP POST or GET to agent

$
0
0
I created this Android app that allows you to communicate with your agent via HTTP POST or GET. I had a lot of trouble trying to communicate with my Imp via an Android app, but I was finally able to make it work. Feel free to take this app and modify as needed. There is a brief README on my GitHub account about how to use it. Hopefully it helps!

https://github.com/sethernet/Android-to-Electic-Imp

Trying to combine two programs, but don't know how to combine their http.onrequest() 's

$
0
0
Dear Imp folk,
I love the Imp. And I built an Imp that reports 5 sensors and controls 4 relays for pumps.

Now, I have two programs that need to be combined. Each one works on its own very nicely, but I really need to have them both operating on my imp at the same time.

Kindly excuse my lack of programming vocabulary. I have begun a course of study to fix that. I mostly copied, cut, pasted and simplified the two programs from some example programs on Sparkfun. They were more specific than the examples on the Electric Imp website.

From the Imp website, I do understand that I can't have two http.onrequest 's in one program, but that has not helped me figure out a solution.

The first program I used was found at: https://learn.sparkfun.com/tutorials/electric-imp-breakout-hookup-guide/example-2-web-control-request

The second program is found at: https://learn.sparkfun.com/tutorials/electric-imp-breakout-hookup-guide/example-3-web-response

The two programs:
The first of them uses a webpage to control some on/off switches and timers. It uses: http.onrequest(requestHandler); and it uses try, if, and catch stuff.

The second of them reads the pins and reports them to a webpage and it has: http.onrequest(respondImpValues); which calls up the function 'respondImpValues(request,response){....' and a whole lot of stuff to allow it to report the imp pins.

I've tried to combine the two by adding the stuff implemented by the respondImpValues stuff of the second program inside the try, if...stuff of the first program. That mostly doesn't work. But..... if I comment out either of the http.onrequest lines, then each of the others does work, ...but just not at the same time.

Can someone suggest the solution. I apologize in advance for my ignorance.

Thank you.
Jeff

Is it possible for IMP002 to automatically connect to any free WiFi?

$
0
0
A customer would like to build a mobile BLE to WiFi gateway. I was thinking about Electric Imp but they would like the WiFi to connect automatically to any available WiFi close by and securely talk to the IMP server for procesing. Is this possible?

Is IMP002 going absolete?

$
0
0
1) Please let me know if the IMP 002 is going obsolete.
2) Also, what is the smallest Electric Imp device as this would be used in a wearable device
3) Do you know of a very small (ideally an eink device that could be used with the IMP002?

Jens

new_agent_for_device...

$
0
0
2016-04-06 15:43:40 UTC+2 [Agent] Play 0
2016-04-07 13:20:15 UTC+2 [Status] Agent stopped: new_agent_for_device.

Yesterday, the prototype with IMP003 was running fine, now I have above log entry and the agent is offline...
Can't find anything wrong. Even complete removal of all agent code does not bring it back online...?

Congratulations on a rocking Series C

Bizarre blinking...

$
0
0
Hi!

Okay so here's the deal

I have a program that does a couple different things
-It can ask for a frequency value from the user and subsequently blink an LED on and off to that frequency
-It can allow the duty cycle to spend whatever percentage of time on or off. (i.e. If you wanted 75% of the period on and 25% off, it can do that.)
-It can loop that frequency forever OR you can set a count in which case the LED will only blink the set amount of times that you tell it to. (i.e. If you have a count of 10 with a frequency of 1 Hz, The LED will blink 10 times at 1 complete blink (on/off) a second)
-Finally, you can simulate noise by allowing one of the counts to be a higher frequency than the others. (i.e. If I have an oscillation with a 40Hz frequency that only lasts for 10 blinks, I want the duration of the 10th blink (on) to have a frequency of 500Hz)

All of these features work except for the last one that only kinda works.

Being that I was going to be dealing with some pretty high frequencies, I decided to hook up my circuit (which is the basic electric imp startup circuit with LED) to a Tektronix TDS 640A digitizing oscilloscope.

This way, I was able to test and make sure that all of the features above worked

However, I noticed something about the test with the added noise.

Suppose the frequency is 8 Hz
The count is 10
The location of the noise is on count 10
And the frequency of the noise is 50Hz

This should blink 9 times with a frequency of 8Hz, and on the 10th blink have a frequency of 50Hz.
(Just to be clear, the 10th blink is the same duration as the other 9 blinks. The period here would be 1/8, So each blink spends 1/16 seconds on and 1/16 seconds off. On the 10th blink it would 1/16 seconds having a frequency of 50Hz.)

HOWEVER,

The FIRST blink is several milliseconds SMALLER than it's supposed to be
The time off between the 9th blink and the 10th blink is SMALLER than it's supposed to be
AND the 10th blink with the noise is LONGER than it's supposed to be
Everything else is fine

i.e. Blink 1 (on) < 1/16
i.e. Blink 9 (off) < 1/16
i.e. Blink 10 (on) > 1/16
i.e. Blink Everything else = 1/16

I've checked my code over and over again and the calculations should be giving me 1/16! But the scope reads something different.

Here's what I'm sure it ISN'T
-Pretty sure it's not my scope. It can read a lot faster than this and has been tested against other devices and works fine
-Pretty sure it's not any limitations within my code
(I'm using imp.sleep which has a resolution of about a microsecond, so we should be good there)

Here's what my code looks like: (ignore slideron, that's the 50% on 50% off thing, that won't change)

hardware.pin8.configure(PWM_OUT, period, slideron);
imp.sleep((period * (countlocation - 1.0) * 1.0));
hardware.pin8.configure(PWM_OUT, periodtwo, slideron);
imp.sleep((period * 0.5) - periodtwo);
hardware.pin8.configure(DIGITAL_OUT, 0);
imp.sleep(period * 0.5);

These differences are small, only a couple milliseconds. But I need to test with big frequencies so those milliseconds can make a difference.

I apologize if I've explained this poorly
It's such a strange error in a process that otherwise works, so I figured I should try and explain everything I can
But please feel free to respond with any questions and I'll do my best to explain it better

Thank You for reading my obnoxiously long post! Sorry, I can be unnecessarily verbose :P
And Thanks so much for your help!
Greatly Appreciated!

Cost to use imp

$
0
0
New to imp. Based on my limited understanding of the architecture, there is a monthly or annualy service fee per device charged by the company. If it's true, would you please let me know the cost structure to build an IoT platform around imp? Thanks

how to get internet

$
0
0
Hello,
how do you guys do to get internet connection where there is not WIFI in the street?
I see that you all talk about WIFI but what if there is not any? how do you still get connected to your devices remotely?

let me know your comments 'cause there must be way to get this around.

Thanks

How to roughly estimate I/O use by connected devices?

$
0
0
My online service says that each electric imp I deploy is using up to 300 MB/s of data per month. These Imps sleep and wake up each minute and upload readings on either 5 or 7 thermistors.

I'm pretty surprised by that number, but really don't know how to estimate data use by an online device? Are there any rough and easy ways to estimate I/O use by an online device? Rules of thumb?

Basically I'm wondering if it is at all possible for an electric imp to use 300 MB/s a month when it wakes up for a second or two each minute to upload a handful of temperatures.
Viewing all 168 articles
Browse latest View live