아날로그 센서 두 개를 연결할 수 있습니까?

4279 단어 voodoospark

묘사

TMP36과 Spark Core 제조업체 세트에 있는 민감한 저항기를 연결하려고 시도하고 있습니다.나는 한 번에 voodoospark 하드웨어를 통해서만 읽기 수를 읽을 수 있다.먼저 성명한 모든 five.Sensor 는 '데이터' 이벤트에서 정확한 읽기 수를 얻을 수 있다.나머지는 출력null에 불과하다.개인적으로 그것들은 잘 돌아가는 것 같다.
아래의 도표와 코드를 참고하세요.
spark core fsr and tmp36
코드:https://gist.github.com/ericterpstra/0c4127e1c9c6efc23e03
이 예에서 나는 0.5초에 한 번씩 상당히 정확한 tmp독수를 얻고 2초에 한 번null을 받는다.만약 내가 fsr = new five.Sensor를 tmp 위로 이동한다면 나는 fsr독수를 얻을 수 있지만 null온도를 얻을 것이다.이것은 복도교의 한계입니까, 아니면 내가 무엇을 잘못했습니까?
고마워요

토론 #1

이거 해봐요.
bool 어떤 센서 = 0;//온도 센서를 "0"센서와 힘 센서로 가정합니다
1
어떤 센서^=1;//이걸 네가 바꾸고 싶은 곳에 놓아라.
0을 1로, 1을 0으로 전환
그래서 한 센서에서 읽는 수를 읽고 다른 센서에서 읽는 것을 시도해 볼 수 있다.
에서
이렇게 하면 되나?
2014년 7월 27일 일요일 오후 3시 40분, 엘릭 트푸스트라[email protected]
쓰기:

I'm trying to hook up the TMP36 and the force sensitive resistor from the Spark Core maker's kit. I can only get one reading at a time using the voodoospark firmware. Which ever five.Sensor is declared first is able to get proper readings from a 'data' event. The other just outputs null. Individually, they seem to be working fine.

See the diagram and code below.

[image: spark core fsr and tmp36] https://camo.githubusercontent.com/2e4340514c80ad2b4639e95c3dc1b2306dce22ca/687474703a2f2f6572696374657270737472612e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031342f30372f737061726b5f746d705f6673725f62622e6a7067

Code: https://gist.github.com/ericterpstra/0c4127e1c9c6efc23e03

In this case, I get fairly accurate tmp readings every .5 seconds, and null every 2 secs. If I move the fsr = new five.Sensor above the tmp, then I get fsr readings, but null temperatures.

— Reply to this email directly or view it on GitHub https://github.com/voodootikigod/voodoospark/issues/27.

토론 #2

@Stabitha는 불행히도 효과가 없습니다.단지 하나 이상의 다섯 개가 있을 뿐이다.센서 정의(읽기 여부에 관계없이)는 빈 값을 만들기에 충분합니다.

토론 #셋

일부러 그런 거야?

토론 #4

이곳의 시뮬레이션 신호와 시뮬레이션 트랙 사이에는 아무것도 없는 것 같다.https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor

토론 #5

이것은 불꽃심의 상세한 인발도입니다. 아마도
정보성:
https://docs.google.com/drawings/d/12OdPwacGCoI-6NfFAYS2rjWgYxKWuHG0zupCH1tGLEQ/edit?hl=en&forcehl=1
이것은 아마도 아두노 코드를 이식하는 문제일 것이다.네가 사용해 본 적이 있다
불꽃 위의 A1 또는 A6 복제 문제?
2014년 7월 28일 월요일 오전 8:51, 릭 월들론[email protected]
쓰기:

Looks like there's nothing between the Analog signal and the Analog pin here: https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor

— Reply to this email directly or view it on GitHub https://github.com/voodootikigod/voodoospark/issues/27#issuecomment-50348730 .

토론 #6

@rwaldron 접지의 콘덴서는 스파크 코어 커뮤니티(see this thread와 공식 스파크 코어documentation가 추천합니다.

토론 #7

또한 FSR에 다음 스레드를 연결합니다.
http://community.spark.io/t/coffee-break-anybody-with-maker-kit-publish/4091
http://community.spark.io/t/force-sensor-using-with-3-3-v/5201
@Stabitha 다른 바늘 해봤어요.FSR의 경우는 다릅니다.콘덴서가 GND에서 더 멀리 떨어져 있기 때문에 TMP36의 경우 읽기 수가 사실상 더 나쁘다.
또한 FWIW는 Tinker 펌웨어를 사용해도 괜찮을 것 같습니다.나는 팅커 iOS 앱이나 간단한 시옹을 사용할 수 있다.js 스크립트(Tinker 어댑터 포함)는 두 개의 센서를 읽습니다.시옹과 복도교 방진을 함께 사용하자 두 센서 모두 빈값이 생겼다.
나는 Johnny Five + Voodoospark를 사용하는 것을 더욱 좋아한다. 왜냐하면 그것은 낮은 딜레이 (적어도 한 번에 한 센서에 대한) 로 가장 일치하고 믿을 만한 읽기 수를 만들 수 있기 때문이다.

토론 #8

@ericterpstra는 추가 정보를 제공해 주셔서 감사합니다. 오늘 제가 한번 보겠습니다.

토론 #9

@ericterpstra에서 명령을 잃어버리지 않도록 펌웨어를 업데이트했습니다.이전에는 프로세스 인풋이 각각 loop 에서 한 번만 호출되었습니다.사용 가능한 바이트가 다 소모될 때까지 계속 호출됩니다.

좋은 웹페이지 즐겨찾기