How to define an SPI connection ...? #1651
Replies: 12 comments
-
Posted at 2017-01-12 by @gfwilliams It looks to me like someone didn't test all the modules they uploaded to espruino.com :) Just a second, I'll make some fixes - what you're doing seems fine. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by @gfwilliams Actually I was being unfair. Espruino changed recently so it errors for undefined variables - this would have worked fine previously, but it had some code left over from being copy/pasted from the MCP20S17 that would make it fail now. If you try now I've changed it and it should work (you may have to shut down the IDE and restart it, as it might cache the modules). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by xas @gfwilliams Thanks for the fast answer, it seems to working now correctly! Thank you! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by xas ... and the next question, of course...: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by @gfwilliams No, that's fine - once it's written into flash with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-13 by xas @gfwilliams thanks for the answer. No, I use an external text editor and I copy (frequently) the whole E.setBootCode (...) with ctrl+C/V to the left side of WEB IDE. In this way the download of external moduls are missing. Is there the possibility to download separately a package?lib?include?etc? to the moduls e.g. to MCP23S17 - also without the rigth side of WEB IDE? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-13 by @gfwilliams Well, you can:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-13 by xas @gfwilliams thanks for the info. I'll check all the three. You're right the first is the most convenient way. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by xas Can you please give me a solution, how can I control the LED in this example (see the attached picture)? PICO can now see the MCP23S17 (see console.log() on the IDE picture), but I cannot control the LED (on/off) with port.A0.* or other commands - what I'm doing wrong?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by @gfwilliams Have you set the pin mode to output? Also, to check it's working, you could also try reading back the values with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by xas write/read was ok and readPort returns with 4801 (see att.), but no LED activitate was visible...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by @gfwilliams Not sure I understand? what's MCP-19/MCP-20? What happens to the value from readPort if you connect up other pins of the MCP23S17 to 0 or 3.3v? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-01-12 by xas
Hi All, my problem is in short:
Thank you for your answer!
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions