DigitalRead 및 AnalogRead 함수에는 추가 바이트가 필요합니다.

4432 단어 voodoospark

묘사

나는 복도교 공원을 위해 바둑 창고를 하나 썼다.https://github.com/audreylim/vspark.
테스트 라이브러리에서 나는 세 번째 바이트를 추가해야 한다는 것을 발견했다. (https://github.com/audreylim/vspark/blob/master/vspark.go#L182) DigitalRead 및 AnalogRead 기능이 정상적으로 작동하도록 설정합니다.이것은 내가 처음으로 함수를 호출할 때 비로소 필요한 것이다.세 번째 바이트는 첫 번째 호출 후에 삭제해야 합니다. 그렇지 않으면 결과가 신뢰할 수 없을 수도 있습니다.이것은 기록이 없는 것이다.
나는 코드의 일부 내용을 무시했는지, 아니면 이것이 복도교 방진의 요구인지 확실하지 않다.

토론 #1

~~ 두 가지 읽기 유형이 있습니다.
~~~ - 보고[ 0x03 | 0x04 ]~~
~~-대답:~~~
~~~- 숫자: [0x03, pin, value]~~
시뮬레이션: [0x04, pin, value]~~
~~~ - 이 두 가지 상황에서 value 모두 두 개의 7바이트 형식으로 발송되므로 [action, pin, lsb, msb] 제외~~
연속 보고[ 0x05 ]~~
~~-연속 디지털 보고서: 보고서마다 두 개의 메시지만 발송할 수 있고, 메시지마다[action, port, portValue]는 발송할 수 있다. 그중portValue는 8자리 값port이고, 각'포트'에 대해서는 report이 0 또는 1이며, 8인용: 0(D0-D7), 1(A0-A7)을 정의했다. (아날로그 인용은 디지털 인용으로 사용할 수 있기 때문이다).[action, pin, value]0x03~~
~~-연속 시뮬레이션 보고서: 최대 8개의 메시지를 발송할 수 있습니다(예를 들어 value~~
~~ - [action, pin, lsb, msb] 두 개의 7자 바이트로 보내기 때문에

토론 #2

제외~~~
~~https://github.com/voodootikigod/voodoospark/blob/master/firmware/voodoospark.cpp#L180- 죄송해요, 보고서를 오해했나 봐요.또한, 위의 모든 내용을 써서 죄송합니다. 보아하니 당신은 이미 모든 것을 통제하고 있는 것 같습니다.)
나는 bytesExpecting, byteCount 와 호출 processInput 을 통해 충분한 바이트가 없을 때까지 버퍼를 소모하려고 시도하는 것 사이에 문제가 있다고 생각한다.

토론 #셋

스파크 IO에 두 가지 함수를 추가했습니다. analogReadOncedigitalReadOnce입니다. 2바이트 버퍼를 만들고 voodoospark에 보냅니다.이것은 분기입니다.https://github.com/rwaldron/spark-io/commit/adc1de9dc0eace17d5af4c8e56512ff92c4b6abb나는 어떤 믿을 수 없는 행위도 복제할 수 없다.[action, pin] 이것 괜찮아요?루바드론?
2015년 1월 5일, 월요일, Rick [email protected]쓰기:

In Spark-IO, I added two functions: analogReadOnce and digitalReadOnce, which create a 2 byte buffer ([action, pin]) and send to voodoospark. Here's the branch: rwaldron/spark-io@adc1de9 https://github.com/rwaldron/spark-io/commit/adc1de9dc0eace17d5af4c8e56512ff92c4b6abb I cannot reproduce any unreliable behavior.

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



크리스 윌리엄스
무독신http://twitter.com/voodootikigod| GitHub
http://github.com/voodootikigod
불가능한 일의 제조자:JSconfhttp://jsconf.com/| RobotsConf
http://robotsconf.com/|맥주.jshttp://beerjs.com| 플래그.js
https://github.com/voodootikigod/logo.js| 노드 직렬 포트
http://nodebots.io/

토론 #4

이것은 오류 보고서로 통합할 수 있는 것이 없습니다.)

토론 #5

아, 생각해 봤어. vspark는 v2에 기반을 두고 있어.4.복도교방주.나는 그때부터 버퍼 크기에 약간의 변화가 생겼다는 것을 알아차렸다.나는 네가 복도 교방진의 최신 버전으로 너의 코드를 테스트한 것이 틀림없다고 추측한다. 그래서 나는 최신 버전으로 vspark를 실행했는데 결과가 매우 좋았다.
@rwaldron을 도와 주셔서 감사합니다.새로운 복도교 공원을 지원하기 위해 vspark를 업데이트했습니다. 지금은 안정되었습니다.https://github.com/audreylim/vspark
마음대로 사용해 보세요:)

토론 #6

좋아요!
크리스 윌리엄스
무독신http://twitter.com/voodootikigod| GitHub
http://github.com/voodootikigod
내가 만든 물건을 너는 반드시 보아야 한다.
안전했어http://www.saferaging.com/| JSConfhttp://jsconf.com/|
기계인http://robotsconf.com/|로봇 스위클리
http://robotsweekly.com/
인터넷의 소극적인 감정을 끝내고 공유해 주세요.
http://jsconf.eu/2011/an_end_to_negativity.html.
2015년 1월 7일 수요일 오전 11:28, 오드리 린[email protected]
쓰기:

Ahh I figured it out - vspark was based on v2.4 of voodoospark. I noticed there were some changes to the buffer size since then. Guessed you must have tested your code against the later voodoospark version so I ran vspark against the latest version and it worked out alright.

Thanks alot for your help @rwaldron https://github.com/rwaldron. I've updated vspark to support the newer voodoospark and it's stable now: https://github.com/audreylim/vspark

Feel free to try it out :)

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

토론 #7

최고:)

토론 #8

#37과 #38을 만들고 자술과gh페이지 인덱스에서 Vspark에 링크를 추가했습니다.'참고 실현'부분의 html.

좋은 웹페이지 즐겨찾기