Differences
This shows you the differences between two versions of the page.
| test-and-measurement:analog-discovery-pro-3x50:smart-lamp [2021/10/15 00:01] – attempt to make the reason for using a HAL less negative wrt SDK Arthur Brown | test-and-measurement:analog-discovery-pro-3x50:smart-lamp [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ~~TechArticle~~ | ~~TechArticle~~ | ||
| {{ : | {{ : | ||
| - | |||
| - | <WRAP center round todo 60%> | ||
| - | This page is under construction. | ||
| - | </ | ||
| <WRAP group> | <WRAP group> | ||
| Line 777: | Line 773: | ||
| <WRAP group>< | <WRAP group>< | ||
| The Analog Discovery Pro can initiate SPI communication on any of the digital pins, after which it can exchange data with the connected slave device. | The Analog Discovery Pro can initiate SPI communication on any of the digital pins, after which it can exchange data with the connected slave device. | ||
| - | |||
| - | <WRAP center round important 90%> | ||
| - | Due to Wiki issues, in all appearances of the syntax " | ||
| - | </ | ||
| </ | </ | ||
| <code python> | <code python> | ||
| Line 879: | Line 871: | ||
| # cast data | # cast data | ||
| if type(data) == int: | if type(data) == int: | ||
| - | data = "" | + | data = "" |
| elif type(data) == list: | elif type(data) == list: | ||
| - | data = "" | + | data = "" |
| # enable the chip select line | # enable the chip select line | ||
| Line 916: | Line 908: | ||
| data = [str(bin(element))[2: | data = [str(bin(element))[2: | ||
| data = [int(element, | data = [int(element, | ||
| - | data = "" | + | data = "" |
| return data | return data | ||
| Line 929: | Line 921: | ||
| # cast data | # cast data | ||
| if type(data) == int: | if type(data) == int: | ||
| - | data = "" | + | data = "" |
| elif type(data) == list: | elif type(data) == list: | ||
| - | data = "" | + | data = "" |
| # enable the chip select line | # enable the chip select line | ||
| Line 947: | Line 939: | ||
| data = [str(bin(element))[2: | data = [str(bin(element))[2: | ||
| data = [int(element, | data = [int(element, | ||
| - | data = "" | + | data = "" |
| # disable the chip select line | # disable the chip select line | ||
| Line 1165: | Line 1157: | ||
| <WRAP group>< | <WRAP group>< | ||
| This module can be used to initialize UART communication on any of the digital I/O lines, then send/ | This module can be used to initialize UART communication on any of the digital I/O lines, then send/ | ||
| - | |||
| - | <WRAP center round important 90%> | ||
| - | Due to Wiki issues, in all appearances of the syntax " | ||
| - | </ | ||
| </ | </ | ||
| <code python> | <code python> | ||
| Line 1267: | Line 1255: | ||
| # cast data | # cast data | ||
| if type(data) == int: | if type(data) == int: | ||
| - | data = "" | + | data = "" |
| elif type(data) == list: | elif type(data) == list: | ||
| - | data = "" | + | data = "" |
| # encode the string into a string buffer | # encode the string into a string buffer | ||
| Line 1295: | Line 1283: | ||
| # make a string from the string buffer | # make a string from the string buffer | ||
| data = list(data.value) | data = list(data.value) | ||
| - | data = "" | + | data = "" |
| # attach previous data | # attach previous data | ||

