-
@Gordon the Espruino is connected to the ground of the scale as well.
The way we are using the scale is by hopefully waiting for a signal from one of the LCD "plates" so I have no idea if the LCD scale is in PWM. I doubt it though. -
Okay the top HES is the door HES and is C6. The right HES is C7 and is for the belt.
The scenario is for my senior engineering class. My partner and I decided to try to prevent child (aged 1-4) heatstroke deaths. We came up with a setup that has an HES on the door and one on the belt of a car seat. The scale would be on the place where the child would sit. The scale (how we would have it) would output the weight of the child to the board so we could use it, but we couldn't find a way to integrate it that way do we opted for a signal that would come from the scale Lcd when the weight was above the minimum value(the scale shown turns on the lcd above a minimum weight). That wasn't the case. The child would be placed in the safety seat which would add weight to the scale and then the belt would be buckled together which would activate the belt HES. When the driver opens the speaker should sound for five seconds and be org for five seconds until the belt is unbuckled and the child removed from the safety seat. Closing that door should not turn off the speaker.
-
Sorry for the late response, I must have missed the email notification.
New updates:
I have no idea whether the weight sensor (scale LCD hack setup) can be used because the value always switches from 1 to 0 at random without any weight put on the scale
Switched the scale output to C4 or C5 to implement the ADC to see if I'd get a different value (the value still just goes from like 0.864 to .5something to .28something to 0 at random)
The Hall Effect sensors I have are the kind that switch on, meaning (so far as I understand) they have to place the one pole near it to activate it, remove that pole, and then place it near again to deactivate it.Is the event - A) 'door just closed', or - B) 'door just opened'?
The one HES (Hall Effect Sensor) is on a door that is (what I wanted it to do) just opened. The code with it though needs to reflect the switch aspect of the HES. Did I also mention that this HES is the sensor on C6?
You also have a crossed-out timer. What was the original purpose of it?
The original purpose of the timer was to have the program check if the scale and belt HES were both on and then sound the speaker for a certain amount of time until the scale and belt HES went off no matter the reading of the door HES and then somehow be able to repeat this (scale would output and then belt HES would activate and then wait for door to open). Also with that little note, I realized that someone would have to open the door after those two activated, and I need it to go off only after the person is getting out of the car (so opening the door after setting up the sensors but ignoring that door opening until the person gets out) . Anyways, the timer now would just be used for timing the time the speaker is on and then off.
I will upload the picture in another post as well as a better description.
Hopefully that helps answer some things. Thanks!
-
I'm using a Hall Effect sensor that likes to just switch to an on state and stay there even when the magnet is taken away. I might just need a general knowledge of the sensor as well as a few questions below.
How would I deactivate the sensor every time? like for example, putting the same side of the magnet to the HEs or the opposite side?
Any way to not have it act like a switch?
Thanks!
-
I've tried to use the block code you provided but I ended up with an out of memory error.
I also have an algorithm I've made.
What I have to do is check for a belt attachment (hall effect sensor on C7) and at the same time have a weight on a scale that is literally connected to the LCD connections (A8) (should send a current out when the weight is above like 7kg). Then when a second hall effect sensor is tripped off (from having a magnet to none) then make a sound to remind someone to remove the belt sensor and the weight and then the sound should stop. Also the sound should alternate 5 seconds on and 5 seconds off.If it would help I can include pictures of my setup.
Would the device work better with the actual Javascript code? I guess I could try.
Thanks for your help so far!
-
I don't quite understand the first option. What would the variable do as far as exiting the loop
And far as the second one, would I make this a recursive function? I'm just making sure that the program can be reset essentially (without literally pressing the reset button).
Either way here's what I interpreted from your second option
-
-
I need to end a "repeat every __ seconds" loop, but I only want it to end after a certain condition is met. I think that just putting the "break out of loop" control function would work but it is warning me that it needs to be placed in a loop, which it technically would be. I'll place an image to show what I mean just in case.
-
-
I would like to connect a load sensor and two Hall-effect sensors to my Espruino Board 1.4b. Does it matter where I connect the wires to on the board for a sensor that doesn't have a module?
Would it matter for the load sensor what area I connect it to on the board? The sensor has a ground wire and might need a specific voltage. Also with the load sensor, it will need to be converted to a digital signal (so I'm guessing an ADC spot) . I think voltages matter in an ADC conversion and the load sensor has the capacity of sensing up to 50kg. I'm also not familiar with the voltage conversion equation enough to really know what I need to do with the load sensor so that it senses up to the 50kg max.
If it also wouldn't be to much trouble, does anyone know a good setup that would work with a load sensor like the kind I have?For the Hall-effect sensor, my main concern is using a resistor with the sensor. How would that work with the Espruino Board? And the resistor is needed.
Link to Load sensor page:
https://www.sparkfun.com/products/10245Link to Hall-effect sensor page:
https://www.sparkfun.com/products/9312Thanks in advance!
@Gordon I tried to use a scope but I didn't really find anything. I also didn't know what to have my physics teacher do with the scope. I did find however that there is a constant wave going through that specific LCD pin/plate(I don't know what to call them at this point) which would account for the non-zero value. I also don't know what kind of LCD I have in the scale, since that might shed some light on what kind of input that kind needs.
I have 10K ohm resistors but no capacitors unfortunately.