Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C and Block Factory #5

Open
Uppermill opened this issue Mar 9, 2021 · 3 comments
Open

I2C and Block Factory #5

Uppermill opened this issue Mar 9, 2021 · 3 comments

Comments

@Uppermill
Copy link

Seb

I am trying to use the hardware I2C for use with Grove Modules. The existing blocks do not seem to allow a write to a memory location and I cannot write data from variables.

I have tried to create a new block and copied the stubs into the I2C files. The new block does not appear on the list.

I tried to duplicate an existing I2C block and change its name (and the names in the block). Again it did not appear on the list.

In both cases, I restarted BlocklyArduino.

I checked the documentation but couldn't find anything to help.

Can you point me to any documentation on the topic?

Thanks for all your help.

Allan

@SebCanet
Copy link
Member

SebCanet commented Mar 9, 2021

Hi,
really sorry about the I2C block, can you send screen capture of the bad ones please?
I hope this old wiki could help: http://technologiescollege.fr/wiki/doku.php?id=fr:arduino:blockly_rduino:creerblocsmultiling and the english version is deprecated http://technologiescollege.fr/wiki/doku.php?id=en:blockly_rduino:create_blocks
No time for that, sorry.
With specific files and asking on forum, you could have help.

@Uppermill
Copy link
Author

Thanks for the documentation,it has enabled me to create a custom block.

Here is more information about the I2C problem. I need to use the Hardware I2C to communicate with the Grove Shield. The blocks available are as follows.
i2c_blocks
I can use the blocks to successfully read a device such as the PCF8591 ADC but I can only write data by setting a constant in the Write block. There does not seem to be any way of writing data from a variable. There is also no direct way of writing data to a memory location.

I can control motors using UIFLOW with the following blocks.

uiflow

Although I haven't looked in detail, I think there may be a similar problem with the Software I2C.

Thanks for all your help.

Allan

@SebCanet
Copy link
Member

Hi,
I've not tested this blocks, I've not created them...so if there's any bug, feel free to fix it and send a patch.
Any help is welcome!
Thanks.

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

No branches or pull requests

2 participants