Thursday, 28 April 2016

[HCII] Thingspeak & get command error, the not-so-detail details.

Alright, i will talk about the localhost one first. First of all, the decision of using localhost as the server was triggered by our desperation with the way thingspeak server did its job. We thought that the server was really busy so that our request can't be processed. Once we decided to use localhost, Harits decided to tinker a bit using it, and he finally found the way to actually make it work. Using a slightly different syntax of GET HTTP command, he achieved the result as told in the previous post. Here is the syntax:


The actual source code could be viewed here.

And then, the thingspeak one. Since Harits found that the syntax was slightly different, he decided to tweak it a little to use it to connect to the thingspeak. The result could be viewed in the previous post. Anyway, here is the picture about the changes in the source code:

before:

after:



an obvious error lol. The syntax was wrong. I guess we got the wrong reference of source code on the first pircture lol. Sorry for our incompetence.

[HCII] Another Update, Deal with it. CW: Rant Inside

Yes, it's about another update on my Human-Computer Interaction Interface final project, deal with it.

At least, we're over with ESP programming by using localhost instead of thingspeak as a server. Harits has done some wonder work in this as i don't know how he made it to be honest (gotta check the source code and the server later). Apparently, thingspeak is so busy processing other users requests so that ours got neglected and resulted in "server busy blah blah" error. I don't know how and frankly don't really care why, but at least we have put a problem to its rest.



Yeah, never trust thingspeak.

Oh, and here's some proof.






So this week was mainly about setting up the OV7670 camera module, or finding on how to stream a video from an arduino-connected camera. We found some library at www.arducam.com . You might want to check it for yourself in http://www.arducam.com/download/ . The problem is..... it sets and tweaks the camera in a low-level fashion, and it is kinda hard to learn it, and the functions/procedures in the library isn't really well defined (at least in english). Am i joking? No i am not, check it by yourself (of course i would really appreciate your help if you understand something).

As we were having a hard time learning it, we found another solution by using an android application named IP WebCam that turns your smartphone camera into network camera. Harits found a YouTube tutorial and he set his cellphone just as the video instructed and somehow it worked. Anyway, here is the video:


So, what's next?


IP WebCam might work, but we still have to figure out how to combine it with the webpage and the arduino, of course if we've decided to use it. It's not final yet. We still could make the OV7670 work but the possibility is lower than just using the IP WebCam.


Gotta run, thanks for reading the post. I'll see you when i see the fit time.



EDIT (28/04/16 10.40 PM):

Harits somehow found a way to send data to thingspeak. Turns out because of the Get HTTP protocol error that made the data transfer to thingspeak failed. I still have to read the source code first so i can tell you what was wrong and how he overcame the problem. I will update it once i get the source code. Anyway, Here's some proof:



Kudos to Harits, Undeniably MVP of this week. And kudos to everyone too, you all have been a great help.

Thursday, 21 April 2016

[HCII] Yet another update of final project

Yet another update.

This week was all about thingspeak. I don'treally have the idea why but it sucks. We can't really put something on it, but we still tried to do it, at least until today.

Oh, and yeah, we did make an automation of connecting to an access point. Should be easy, but at one time, my friend mis-assembled a part and it became like this:



yes, he assembled it in an inverse manner of what it should be. I reckon it must be the RX and TX pin (we didn't work in one place, only via instant messaging app). And at least, after the circuit is re-assembled (in a right manner), we got a response like this:


I don't really know why Harits referred me as "some friends" as i actually am his teammate, but from what i saw from the code at that time, we missed a function to configure the ESP and that is the configuration of the transmission method as it should be set to unicast. By source code function, it should be "AT+CIPMUX=1". And then, the result became this:


And you know what? That "Send OK" was just a lie as the thingspeak didn't receive anything to be shown in graph. We look for the problems again and i, once again hypothesized  from the source code, that the size allocation of the data that would be sent was not configured well. So Harits made a change to the source code by adding these four lines of code:


and the result is:



I would really use swearing words right here if only Mr. Soni wouldn't read my post. (No no no sir, i'm not suggesting you to not reading my post. I still need the mark to pass the class).

So, moral value of the story: Never trust Thingspeak, or IoT, or me, or my friends. (No no no i trust you guys from all of my life, ok that's exaggerating, but i trust you all, or maybe not. Banter.)

Oh i almost forgot, Harits had actually bought the camera. Its name is OV7670 Camera Module (yass another new toy to tinker with..... hold on, i only have a week left, poor me). You can see the specifications here:

http://www.elecfreaks.com/store/ov7670-camera-module-p-705.html

or you might just want to google it yourselves. Fine, whatever. :v

So Harits found a circuit scheme of how to connect this camera module to the arduino. He said he got it from a friend. Too bad he didn't understand how to assemble it. Welp, at least you tried :v

Here is the schemantic:


Yeah, it looks complex :v

Moral story of the final project so far:
  • Never trust Thingspeak
  • IoT takes much the hassle
  • WiFi module might could help you, but it is more likely slow you down if you had no idea about it. It might kill you if you choked on it :v
  • Configuring ESP is a pain itself
  • It may took an uber-hipster-expert-but-not-so-expert to assemble a Camera Module circuit schemantic, or maybe not :v
  • Never trust thingspeak (yeah i said it twice, it is intentional :v)
  • You could ask for your friends help, but that might not bring much help (i said friends, not teammate). :v


Oh almost forgot, here is the link of the source code so far:

https://github.com/harits-adhi/IMKA/blob/master/tesHC.ino

Thursday, 14 April 2016

[HCII] yet another update

It has been two weeks, eh? Truth to be told, i'm getting bored of examining and testing these things so called wifi modules and shields. Got ourselves a WiFi Shield, only not really that applicable. You know, the DFRobot WiFi Shield v3 TEL0079, that doesn't come with any manual or instruction, even it doesn't support the official arduino WiFi library (correct me if i'm wrong, really, i need many corrections right now). The only thing that helps by using this shield is that the configuration is much easier, as it came with a settings webpage (10.10.100.254) and you could set it up like a normal router (finally i'm happy to see something normal).

DFRobot WiFi Shield V3 RPSMA TEL0079


What about the ESP? That is the one that made me bored for these two weeks of tinkering. You know, since i am not really that interested in programming a web or doing something like manual http request, it doesn't attract me so much than just assembling a circuit and program the arduino "normally", let alone making a web page. IoT and i never really get going anyway.

So, what's the deal? As far as i see, we got two options right now: push the shield hard or carry on with the ESP.

Oh, yeah, here is the bonus: High-level design for our Baby Monitor project.
Use Case Diagram of Baby Monitor
Activity Diagram of Baby Monitor

DFRobot WiFi Shield V3 official page: http://www.dfrobot.com/index.php?route=product/product&product_id=1101#.VxBB-0dnfIU

PS: I actually am really grateful that Mr. Soni lent us the shield, shame that it doesn't really work out. I'm sorry if i wrote something unpleasant, but that is what actually happened.