Comments (6)
Each sensor type may have a different set of timing requirements. Some require a request for a sample and then require a wait for the data to return. The DHT11 for example requires a wait of 1 second, while the DHT 22 requires a wait of 2 seconds. Accommodating different sensor types would involve providing a block to configure the sensor type, adding additional complexity. It sounds simple but the details of implementation are not.
I am not sure what a "generic" sensor from Aliexpress is, and so I cannot determine how difficult it would be to implement. If it is a standard part with a standard part number and that adheres to the specs for that part, it may be possible, but without that information, it would be rather difficult.
I am not likely to implement the code for this, but if you would like to try your hand at an implementation, I would be happy to try and provide guidance.
from s3onegpio.
It is possible, and in fact, outside of the Scratch extensions, for Arduino boards, the DHT22 type sensor is supported. The reason that the DHT22 or other temperature/humidity sensors are not supported for Scratch, is that if I support one sensor, inevitably a request would come in for another. Also, streaming type interfaces tend to be complex to support in the context of Scratch.
Currently, the Scratch blocks support the most common digital and analog functionality for the boards supported with some minor exceptions.
What specific sensor are you referring to?
from s3onegpio.
I am using generic humidity and temperature sensors from Aliexpress. They only require vcc, gnd and out signal. I might be underestimating the work required here, but would it be possible to have a block that reads such a stream of incoming data, or it needs to be defined depending on the type of data being sent from the sensor (i.e. boolean, float, int..)?
from s3onegpio.
Thanks for your patience and insight. I will do more research on the matter and get back to you.
Thank you for your fast responses and stay safe
from s3onegpio.
Each sensor type may have a different set of timing requirements. Some require a request for a sample and then require a wait for the data to return. The DHT11 for example requires a wait of 1 second, while the DHT 22 requires a wait of 2 seconds. Accommodating different sensor types would involve providing a block to configure the sensor type, adding additional complexity. It sounds simple but the details of implementation are not. I am not sure what a "generic" sensor from Aliexpress is, and so I cannot determine how difficult it would be to implement. If it is a standard part with a standard part number and that adheres to the specs for that part, it may be possible, but without that information, it would be rather difficult. I am not likely to implement the code for this, but if you would like to try your hand at an implementation, I would be happy to try and provide guidance.
Did you write a sort of tutorial on how to implement the support for other sensors or devices ? Let's think of DHT, LCD panels, etc... which might require extra libraries.
from s3onegpio.
@suoko One must understand how to extend the Scratch side and appropriate hardware support on the board side to add additional support.
My blog has a 5 part posting describing what is involved on the Scratch side. The first part may be found here.
To easily find the other articles, please look at this page.
On the board side, you must modify the appropriate gateway and its associated board control library. For example, the Arduino AVR boards use pymata-express.
The gateways are built using yet another package called python banyan using the OneGPIO concept.
As you can see, adding functionality is a challenging task. However, if you have any specific questions, I am always happy to try to answer them.
from s3onegpio.
Related Issues (20)
- Firefox not able to open project and do not remember installed extensions. HOT 8
- s3rp crash on latest Win10/ Google Chrome when using read digital pin HOT 4
- Translation for Dutch (NL) HOT 6
- Translation for Japanese (robohat) HOT 1
- Translation for Japanese (playground_express) HOT 1
- Thanks for adoption of translation for Japanese HOT 2
- A simple installation procedure for Windows 10 HOT 1
- Initializing functions is lacking for pigpiod HOT 6
- Websocket Gateway exited... without pressing ctl+c HOT 6
- How do I create a Blcok program that can be uploaded to Arduino permanently ? HOT 1
- Translation for German (de) HOT 2
- The current version of S3OneGPIO fails to compile by "yarn start". HOT 3
- Re: Thanks for adoption of translation for Japanese #43 HOT 2
- Connection to ESP8266 seems to be unreliable HOT 3
- a Japanese translation for the extension "OneGpio Raspberry Pi Pico". HOT 1
- Request to host these extensions in my own Scratch 3 fork HOT 2
- DC motor PWM control backwards HOT 3
- Install s3onegpio extension in fresh Scratch does not work HOT 7
- Does arduino work standalone? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s3onegpio.