tl;dr version: how do I push changes to a central device (Raspberry Pi)? Libraries I have tried do not discover UART service and characteristics.
Hi!
I am working on a project to help my disabled sister to operate devices in her house on her own. I am planning on using a combination of the Puck's accelerometer and a Raspberry Pi running this project: https://webgazer.cs.brown.edu/#examples. I hope to publish this as open source so that others may use the project for their needs as well. (Products in the medical industry are VERY expensive. I am hoping that making some things available for free would help those who cannot afford an expensive solution from Tobii/Dynavox.)
She cannot speak, walk, or move very well. However, she can make her Barbie dance by shaking it. I am hoping to harness that movement as an trigger for various home automation tasks in the future. My end-goal is to have her control everything in her environment. She would do this by gazing at the Raspberry Pi's screen to change which device/setting and shake the Puck to change the state of that device. She lives in an impoverished area without access to the internet, so I am looking to make a closed network of IoT devices for her.
Right now, I am starting small: I am making the Puck act as a thermostat and controller for a fan in my kitchen using http get requests to IFTTT.
After multiple hours of experimentation, I was able to get the Puck to receive commands from my macos device. However, I am having trouble figuring out how to have the server wait for a command from the the Puck. Is there a way to have the puck push data to the server? For example, if the puck has been flipped (accel.z < 0), I want to send an instruction to the server to shut off the fan. I also want to do this using as little power as possible.
One last thing: I was able to get the bleak library to work on both macos and Ubuntu on the Raspberry Pi. However, when I attempt to discover services and characteristics, the Puck doesn't respond. I have tried multiple libraries in both node js and python to no avail. (I would love to use @abandonware/noble in node but I could not get that to discover the UART characteristics as well. ) EDIT: To be clear: it does TX and RX to and from the server but discovery doesn't work.
Thanks for reading all of this. Here a link to the GitHub for the thermostat. I will make the eye gaze/motion project open source and available when I start it as well.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
tl;dr version: how do I push changes to a central device (Raspberry Pi)? Libraries I have tried do not discover UART service and characteristics.
Hi!
I am working on a project to help my disabled sister to operate devices in her house on her own. I am planning on using a combination of the Puck's accelerometer and a Raspberry Pi running this project: https://webgazer.cs.brown.edu/#examples. I hope to publish this as open source so that others may use the project for their needs as well. (Products in the medical industry are VERY expensive. I am hoping that making some things available for free would help those who cannot afford an expensive solution from Tobii/Dynavox.)
She cannot speak, walk, or move very well. However, she can make her Barbie dance by shaking it. I am hoping to harness that movement as an trigger for various home automation tasks in the future. My end-goal is to have her control everything in her environment. She would do this by gazing at the Raspberry Pi's screen to change which device/setting and shake the Puck to change the state of that device. She lives in an impoverished area without access to the internet, so I am looking to make a closed network of IoT devices for her.
Right now, I am starting small: I am making the Puck act as a thermostat and controller for a fan in my kitchen using http get requests to IFTTT.
After multiple hours of experimentation, I was able to get the Puck to receive commands from my macos device. However, I am having trouble figuring out how to have the server wait for a command from the the Puck. Is there a way to have the puck push data to the server? For example, if the puck has been flipped (accel.z < 0), I want to send an instruction to the server to shut off the fan. I also want to do this using as little power as possible.
One last thing: I was able to get the bleak library to work on both macos and Ubuntu on the Raspberry Pi. However, when I attempt to discover services and characteristics, the Puck doesn't respond. I have tried multiple libraries in both node js and python to no avail. (I would love to use @abandonware/noble in node but I could not get that to discover the UART characteristics as well. ) EDIT: To be clear: it does TX and RX to and from the server but discovery doesn't work.
Thanks for reading all of this. Here a link to the GitHub for the thermostat. I will make the eye gaze/motion project open source and available when I start it as well.