Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Trying to read from RX #88

Closed
MrYsLab opened this issue Nov 12, 2018 · 4 comments
Closed

Trying to read from RX #88

MrYsLab opened this issue Nov 12, 2018 · 4 comments

Comments

@MrYsLab
Copy link
Owner

MrYsLab commented Nov 12, 2018

@Kushal4092 reported the following error:
Hi, I am using Pymata3
https://htmlpreview.github.io/?https://github.com/MrYsLab/pymata-aio/blob/master/documentation/html/pymata3.m.html#header-classes

library and I am trying to read Rx from my arduino but it says I need to upload FirmataPlusRB. when I do that I get an error. When I upload FirmataPlusRBPixy its fine, but when I am trying to use the pixy_get_block I get empty [] and when I wait but a bit longer the program crashes and says
Initializing Arduino - Please wait... Write exception
Write exception
Write exception

Shutting down ...
Write exception

I was using StandardFirmata and It was working fine but I was not able to use the this function.

this is the Code:
board.pixy_init(max_blocks=1, cb=None,cb_type=Constants.CB_TYPE_ASYNCIO) print(board.pixy_get_blocks())
@MrYsLab

@MrYsLab
Copy link
Owner Author

MrYsLab commented Nov 12, 2018

FirmataPlusRBPixy is specifically used when attaching a PixyCam mounted on a Sparkfun Redbot Robot. FirmataPlusRB is used specifically for the Sparkfun Redbot (but no pixy support).

If you are not using either of those devices, I suggest using FirmataPlus for Uno compatibles and FirmataPlus32u4 for Leonardo compatibles.

Now, on to reading RX. You have not provided much detail about your project, but when Firmata is used with any serial device (USB/Serial, Bluetooth, WiFly, etc.), you do not have access to the RX and TX pins - they are dedicated and cannot be shared.

Does this answer your question?

@MrYsLab
Copy link
Owner Author

MrYsLab commented Nov 12, 2018

I am going to close this issue. If my explanation above did not answer your question, or if you think there is a problem in the code, I will be happy to reopen it. Please feel free to add any comments even though the issue is closed and I will see them.

@MrYsLab MrYsLab closed this as completed Nov 12, 2018
@Kushal4092
Copy link

I am trying to get the values from Rx and Tx from another device to my arduino which uses UART programmable interface. I came across Pixy Serial Protocol.

@MrYsLab
Copy link
Owner Author

MrYsLab commented Nov 14, 2018

I am not clear on how you have things connected or what you are trying to do. As I said above, if you are trying to access the TX/RX pins on the Arduino through Firmata, you cannot. Those pins are dedicated to providing communication between the Arduino Firmata sketch and pymata-aio.

The pixy devices use SPI to communicate with an Arduino. Firmata does not support SPI. FirmataPlusRBPixy, however, implements the SPI interface specifically to communicate with the Pixy.
If you are not using a Pixy then this sketch will not help. The code that writes to the pixy is located here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants