Homework Statement
The problem I'm working on gives the total power (100 W) that will be exerted by a man (80 kg) climbing a set of stairs(r = 8mi + 4mj). It would like to know at what constant velocity he would have to move to achieve the given power.
Homework Equations...
I'm working on a program for my intro level c class. This program is supposed to take in some text and then tell you the number of occurances of each letter used (among other things). Initially I was getting a segmentation fault whenever I ran the program. I tried running the debugger to help...
I'm having difficulty with the question in the pic provided. (http://i.imgur.com/Fg7CHoY.png). Basically the equation I am given is
dy/dx = (y-4x)/(x-y)
and it walks through the steps needed to solve it, however, I am supposed to show how to arrive at each step given. I've gotten part a...
I am having to justify the steps in a proof of the uniqueness theorem. I am supposed to show why the inequality follows from the initial equation.
http://i.imgur.com/AxApogj.png
\phi(t) - \psi(t) =∫0t 2s[\phi(t) - \psi(t)] ds
|\phi(t) - \psi(t)| =|∫0t 2s[\phi(t) - \psi(t)] ds| \leq...
im having trouble with this question - http://i.imgur.com/Ars4J1b.png - more specifically with part a, as i have a good idea how to go about b. given the initial value problem
y' = 1-t+y , y(t0)=y0
show that the exact solution is
y=\phi(t)=(y0-t0)et-t0+t
we've only spoken of...
here is the complete code for what i am doing
int ledstate1=LOW;
long seconds = 0;
long *secPtr = &seconds;
long minutes = 0;
long hours = 0;
long days = 0;
long weeks = 0;
long previous = 0;
long interval = 4900;
unsigned long secInt = 1000;
unsigned long secPrev = 0...
I do not have a debugger available. and having it print the values, for seconds its constantly zero, however secPrev does behave how it should. every second its value increases by 1000 as it should. when i remove the test and replace it with 1
if (1) {
seconds += 1;
secPrev = timer...
yes, they should be unsigned, but with that change it still doesn't allow seconds to increase any. the test (timer - secprev)> 1000000 is to compensate for the rollover.
And millis() counts from 0 the number of milliseconds that have passed since the program started running. in this case, i...
No, though i did try pointers. that didnt seem to help any. with the pointers, the code looked like
long seconds = 0;
long *secPtr = &seconds;
long secInt = 1000;
long secPrev = 0;
void loop() {
timer = millis();
if ((timer - secPrev) > 1000000) {
secPrev = 0;
}
if...
arduino uses C primarily, with a few libraries of its own. what i was going for was for every 1000 miliseconds (timer - secPrev) the value of seconds should increase by one and the new value of secPrev should become the current time in milliseconds (secPrev = timer). the value of secPrev behaves...
I'm using arduino to make a water sensor. The sensor needs to go off after a certain period of time of not having come into contact with any water. The difficulty is that i can't use a delay() mechanism as it would mess with other functions of the sensor. I had thought i found a solution but i...