Help Needed On Creating an Spark App for Artificial Pancreas

Let me try this again. It was, and is, in no way ever my intention to be either offensive or demotivating.

The reason I said it feels like you want a step by step guide, was/is due to the fact that you don't seem to take up information unless it's chewed up in nice little chunks.
The Google Spreadsheet is a good example of that. I know and understand that that topic might look daunting at first, but if you had bothered to properly read it, you would've noticed that there are examples in there which tell you what's happening. It's even commented in multiple places. That doesn't mean you should immediately understand it, but saying "I saw there was code" gives me the impression you didn't bother to look at the code itself.

Believe me when I say we share the same "you-can-do-this" mentality. Maybe it's due to some more experience that we can relate to that a bit more realistically. What you're asking us to explain are things that I'm currently being thought in university. They're not easy to understand, albeit still being relatively easy. It's mentioned before, but perhaps you're taking on more than you can handle, without professional/experienced help.

That's not a question that can be answered on a forum. Most of the concepts being applied in the project you're describing take many years of higher education to get even a basic grasp of. What you've currently built is probably also above your level of knowledge, considering the fact that you didn't knew PH and conductivity are related, for example. That's not a bad thing. The project is surely very interesting, but do you actually understand what's happening on a lower level? Ion exchange, chemical reactions, flowing currents, conductivity, Ohm's Law, Transistors, potentiometers, resistance. Those are no easy concepts to understand.
Unless you understood all of those concepts decently, there's no way you could've built that project without a guide of some sort (which is what you've linked to). Again, that's not a bad thing.
The fact that you'd like to add internet connectivity to it, and expand the current project is also very admirable. The only catch lies in the fact that there are again new, and difficult, concepts to learn, for which there isn't a manual/guide this time. Like I've said before, you'll need to think of things on your own. And when the basic knowledge isn't there (yet), that's nearly impossible.

What has changes since? The fact that you removed that text doesn't mean that your questions don't imply the same. If you do not want step by step answers, then what do you want, exactly? "how does this work" is too vague of a question to answer. We've given you ideas on how you could measure PH values (using the conductivity sensor you built), and we've given you several options to get this information on the web (think Google Spreadsheets), which even included a guide how to do so. If you don't want to use step by step guidance, then please do share what exactly it is that you want?
A recent example of this is the question for me to go through the whole Google topic, and lay it out for you in sizeable chunks. That, to me, sounds like you want me to shop it up into steps you can follow. Other than the fact that I don't feel I should be doing your projects, for reasons listed in several posts, I think you could put in the effort to at least try it yourself. If there's something specific you don't understand, then by all means, please ask away. But in order for that to work, we need concrete questions, like:"why do you assign a variable to that?", or "why do we need a function for that?", not something like:"could you summarize the topic for me?".

It's not that we don't want to help, but there's only so much we can do. If the foundation isn't there, then there little to build on. Building a house on quicksand could also be considered "a bit challenging", using your analogy.
Also, it's not just "a bit challenging". Some of the concepts that are being applied is material that's currently being thought to me at a technical university, studying Electrical Engineering and Computer Sciences. I don't consider myself to be stupid, but half of the stuff in there is still black magic to me. If I asked you to explain Quantum mechanics to me right now, or rocket science for that matter, would you be able to to it? Although it might not sound as fancy, it's a least comparable in terms of difficulty. You shouldn't underestimate that.

You've nailed the EXACT cause of the problem. You ARE in a world where you don't understand the language, or the customs and traditions. Is it reasonable to expect someone from the other side of the world, to teach you all that? They can't teach you everything, but they can push you in the right direction. They can tell you to take a course for the language, or tell you to go to the library to study the customs, or mingle with the people to learn the traditions. But he can't do it for you. If you're going to grow in that strange world, you must do so on your own. Getting help and guidance from others isn't the problem, but they can't learn it for you.
The fact that you're "alone" makes it even worse. Try to imagine that you have to teach a three year old how to ride a bike. Sounds reasonable, right? Now imagine that that kid has never seen a bike. It's also deaf, and can't speak your language. Oh, and also, you're going to have to do it from the other side of the world over a computer.
Sounds ridiculous, right? That's pretty much the problem we're facing. It's not that we don't want to teach the kid how to ride it's bike, it's just so hard when there are so many hurdles to cross. Now, If you were there, you could show the kid how its done. You can hold it's bike, and make sure it doesn't fall. You can help where needed. That is REALLY hard to do from behind a computer screen.
That is the reason why we've said you need experienced help locally. Unless you've got someone helping you out if you find problems, and guide you, it's near impossible for us to help you.


Again, I was in no way trying to be offensive, and I apologise if you feel like I was. I hope the above can make you see some of our standpoints, and help you realise why it's such a difficult issue.

I wish you the best of luck in your future endeavours!

4 Likes

I have a friend who can code multiple amount of coding languages. He would like to know which coding language Google Spreadsheets is in, I discovered some Python, JavaScript but in a previous post you mentioned the use of C/C++?

Ignoring the above mentioned things, try this.
The reference to the C/C++ part can be found here, give it a read :wink:

1 Like

@peekay123
@Moors7
If I wanted Google Spreadsheets to send data to IFTTT

Should it be something like:
If received data on Google Spreadsheet then send data to john.smith@gmail.com?

@benclough, which probe are you looking at?

You can setup the core to send data TO a Google Spreadsheet at regular intervals (15 secs for example). @Moors7 already provided a link that explains how. You and your friend need to read what was posted!

There are pinned topics regarding IFTTT on the main page of the forum, which clearly state that theyā€™re beginner tutorials. If youā€™re planning on learning anything during this project, might I suggest that to be the ability to read and take initiative?

I have a question @peekay123

Can you guide me to a article where you can record the pumping activity over time?
Also can you guide to me an article to this idea

I research and could not find anything specific regarding these two, and would love it if either one of you could point to a few guides regarding this please.

I'm sorry if I am troubling you guys too much, but I can't seem to find any articles :smile:

To do a very simple demo that you are able to get data from the device, you can display the information on your computer using Serial

The example code you can try is:

void setup(){
   Serial.begin(9600);
}

void loop(){
  Serial.println("Hello!");

I hope you have played with Arduinos before of your friend has some clue what this is doing.

From there, we can extend this example to read from the pH probe and display on the computer screen.

Letā€™s not be too ambitious and break down the project into doable steps before even proceeding with Google spreadsheet or apps or whatever.

This way, you have something to demo within the timeframe of your project instead of all or nothing approach. :wink:

Steps

1.) Control pump to on/off
2.) Read the pH value from the sensor
3.) Display the pH value from the sensor via Serial
4.) Increase/decrease pH level according to the sensor reading
5.) Setup IFTTT with email notification when the Spark core goes online (to test that it works)
6.) Setup IFTTT to save data to Google Spreadsheet

This is how you can approach problems in general like an engineering student :smiley:

2 Likes

If you were you send the state of the motor over time, then youā€™d have the pumping activity? Letā€™s say you send the status (pump on/off) every 5 seconds, and you do that for an hour, then you have 720 data points which show you the activity over time. You can plot that, if you want. If you know how much liquid the pump displaces per time interval, you could calculate the amount of liquid moved. That too, can be plotted.

Reading the output of the conductivity sensor is basic electronics again. The fact that you need to ask that question, leads me to believe that you still havenā€™t found anyone with proper knowledge to help you.
To that end, I think it might be a good idea to have you draw the electrical circuit youā€™re using. Not the pictures of the breadboard, but the actual components in a schematic. Seems like a valid test to find out whether you, or the person helping you, knows what heā€™s doing. Youā€™re going to need it anyhow, if you want to understand were youā€™ll need to measure certain things. Unless you want us to tell you where to plug everything in, that is.

1 Like

I don't know if you know this, but I am not trying to control the pump or read the pH value or increase/ decrease the pH level.

I love how you organized it by steps so I have a clear idea of what I'm doing, but I am trying to record the pumping activity, as a line graph, and it would be lovely if you point me to a article(s) about recording pumpinng activity.
I have one minor question:
Where would I code the code for Google Spreadsheets? Is it supposed to be all in Google Script or is it supposed to be coded in online Spark IDE?

Can anybody help me and show me the pumping activity article?

Hey @benclough and team,

We are probably one of the friendliest forum around and there are limitations as to what we can do/help virtually.

Thereā€™s no 2 teams doing the same project so asking for articles on the exact same thing isnā€™t really feasible. You guys need to sit down, discuss within the team and seek advice from the school.

Your teachers in school should be able to provide much more assistance with your questions!

Best of luck with you project :slight_smile:

1 Like

@BRT,

Like I mentioned, there are no examples for that.

No 2 person have done the exact same project.

Try doing everything with Serial. Like use a number to present the pump activity and display it on the screen. (Same approach just different way to display)

Example:

void setup(){
   Serial.begin(9600)
}

int pump = 0;

void loop(){
   Serial.println(pump);
   delay(1000);
   pump = pump + 1;
}

You guys will really need to know what is exactly going on for each line and hereā€™s no point in us providing answers as people are going to ask you how this and that works and how it is coded!

Do and demonstrate what is within your capability. Thatā€™s much more important :slight_smile:

Thank you, but I search Google and forum but canā€™t find anything regarding Serial

Okay, let's give this another shot. I'm going to try and be open minded here, so bear with me.

First of all: there has never been a project like yours before. That in its own right is commendable. Good job so far. The fact that you managed to build it without knowing the underlying principles is completely okay, and very doable thanks to the great step-by-step article you guys linked to. That is also the problem with the question you're asking right now:

We simply cannot do that. That not because we don't want to, but because no such topic exists. The best we can do is offer you ideas and guide you in the right direction. That's what we've been trying to do so far. Having said that, I'm going to ask you a couple of questions. Please, try to answer every one as best as you can.

  1. Have you, or someone who can help you, got experience with micro controller programming, Arduino for example?
  2. Have you, or someone who can help you, got experience with coding scripting languages, JavaScript for example?
  3. Have you, or someone who can help you, got experience with electronics, Arduino for example, or educational experience?
  4. Can you, or someone who can help you, draw up an electrical schematic of your circuit? If so, then please share that here.
  5. Could you, or someone who can help you, make an overview of this whole project in small stand-alone pieces. (hardware setup, measuring, coding, transmitting, parsing, etc)? Please make a flow chart of this, and share this. This is important because "logging and displaying measured data" contains a lot of small parts which all need to be looked at individually. We can't give you articles for the project as a whole, but perhaps we can find some for the smaller parts. If you can combine those, then you should get a working end result. Much like the guide for building the pancreas, there's also a guide for measuring data. There's also a guide for transmitting that data. There's also a guide for logging that data. And there's also a guide for visualising that data. There's just no giant guide for all of those things combined for a specific project. If you can break it up into smaller steps, it suddenly gets a whole lot more doable.

Please, try to answer all those questions as well as you can. As soon as we get a better picture of what we're dealing with, it'll be easier for us to help.

1 Like

@BRT,

most importantly, grab an Arduino or Spark core and try! You will know whatā€™s going on the moment you play with it.

A whole lot of beginner tutorial can be found here: http://arduino.cc/en/Guide/HomePage

This is of great help, thank you :satisfied:

1 Like

@BRT,

with all that said, you guys need to observe some online etiquettes

1.) Thereā€™s no point in responding poorly and stabbing on other peopleā€™s comments

2.) Thereā€™s also no point in expressing your frustrations through CAPS and BOLD words etc

3.) You need to be polite and ask comprehensive questions for help to be provided

4.) Everything you do when talking to friends/relatives/family/teachers should apply to online as well.

Hope you guys keep this in mind! This will help you a lot and make you a better person :smile:

If you choose not to heed this advice, we probably have no choice but to suspend your account for a short period of time. Iā€™m sure thatā€™s not what you would prefer so stop doing it!

2 Likes

Hereā€™s a electric diagram for @Moors7 . Hope this helps.


source of information: http://www.sciencebuddies.org/science-fair-projects/project_ideas/HumBio_p040.shtml#help

The G D S is the MOSFET and the 330k and the 100k are resisttors and the 12V is the battery