Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 Browntest-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~~
 {{ :test-and-measurement:analog-discovery-pro-3x50:app_front.jpeg?200 |}} {{ :test-and-measurement:analog-discovery-pro-3x50:app_front.jpeg?200 |}}
- 
-<WRAP center round todo 60%> 
-This page is under construction. 
-</WRAP> 
  
 <WRAP group> <WRAP group>
Line 777: Line 773:
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
 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 ".join(chr (", a space character was inserted between the "chr" and the "(". 
-</WRAP> 
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 <code python> <code python>
Line 879: Line 871:
     # cast data     # cast data
     if type(data) == int:     if type(data) == int:
-        data = "".join(chr (data))+        data = "".join(chr(data))
     elif type(data) == list:     elif type(data) == list:
-        data = "".join(chr (element) for element in data)+        data = "".join(chr(element) for element in data)
  
     # enable the chip select line     # enable the chip select line
Line 916: Line 908:
     data = [str(bin(element))[2:] for element in buffer]     data = [str(bin(element))[2:] for element in buffer]
     data = [int(element, 2) for element in data]     data = [int(element, 2) for element in data]
-    data = "".join(chr (element) for element in data)+    data = "".join(chr(element) for element in data)
  
     return data     return data
Line 929: Line 921:
     # cast data     # cast data
     if type(data) == int:     if type(data) == int:
-        data = "".join(chr (data))+        data = "".join(chr(data))
     elif type(data) == list:     elif type(data) == list:
-        data = "".join(chr (element) for element in data)+        data = "".join(chr(element) for element in data)
  
     # enable the chip select line     # enable the chip select line
Line 947: Line 939:
     data = [str(bin(element))[2:] for element in rx_buff]     data = [str(bin(element))[2:] for element in rx_buff]
     data = [int(element, 2) for element in data]     data = [int(element, 2) for element in data]
-    data = "".join(chr (element) for element in data)+    data = "".join(chr(element) for element in data)
  
     # disable the chip select line     # disable the chip select line
Line 1165: Line 1157:
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
 This module can be used to initialize UART communication on any of the digital I/O lines, then send/receive data on those lines. This module can be used to initialize UART communication on any of the digital I/O lines, then send/receive data on those lines.
- 
-<WRAP center round important 90%> 
-Due to Wiki issues, in all appearances of the syntax ".join(chr (", a space character was inserted between the "chr" and the "(". 
-</WRAP> 
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 <code python> <code python>
Line 1267: Line 1255:
     # cast data     # cast data
     if type(data) == int:     if type(data) == int:
-        data = "".join(chr (data))+        data = "".join(chr(data))
     elif type(data) == list:     elif type(data) == list:
-        data = "".join(chr (element) for element in data)+        data = "".join(chr(element) for element in 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 = "".join(chr (element) for element in data)+        data = "".join(chr(element) for element in data)
  
         # attach previous data         # attach previous data