Search found 17 matches
- Mon Apr 25, 2022 11:04 pm
- Forum: Programs, Libraries and Tools
- Topic: What the heck does I2C constructor asterisk mean?
- Replies: 4
- Views: 2645
Re: What the heck does I2C constructor asterisk mean?
Thank you for the information, which I appreciate greatly. You have all saved me a lot of time! --Jon
- Mon Apr 25, 2022 7:08 pm
- Forum: Programs, Libraries and Tools
- Topic: What the heck does I2C constructor asterisk mean?
- Replies: 4
- Views: 2645
What the heck does I2C constructor asterisk mean?
In the documentation for the I2C constructors I find a statement such as:
classmachine.I2C(id=- 1, *, scl, sda, freq=400000)
What does the asterisk mean? I couldn't find an explanation and the documentation does not include one. All other information in this statement makes sense.
Thanks --Jon
classmachine.I2C(id=- 1, *, scl, sda, freq=400000)
What does the asterisk mean? I couldn't find an explanation and the documentation does not include one. All other information in this statement makes sense.
Thanks --Jon
- Sun Jul 04, 2021 4:23 pm
- Forum: micro:bit boards
- Topic: MAX7219 Display Driver code (Python)
- Replies: 0
- Views: 8545
MAX7219 Display Driver code (Python)
I work with middle-school kids who want to "get something running" quickly and I don't want them to use GitHub, so here's code that will control a MAX7219 8-digit, 7-segment display. It accepts a numeric string and handles minus sign, decimal point, and blank spaces. This code runs in the MakeCode P...
- Sun Jul 04, 2021 4:15 pm
- Forum: micro:bit boards
- Topic: Decimal-fraction precision question
- Replies: 7
- Views: 45513
Re: Decimal-fraction precision question
Thank you very much for your insight. The information you provided is very helpful and appreciated. Happy July 4th.
- Sat Jul 03, 2021 5:29 pm
- Forum: micro:bit boards
- Topic: Decimal-fraction precision question
- Replies: 7
- Views: 45513
Decimal-fraction precision question
These two lines: my_string = str(-0.3470) #Test value basic.show_string(my_string) yield the string "-0.347". That trailing zero is important in science and engineering because it indicates accuracy. For example, 0.3 mm is not the same as 0.30 mm. The latter indicates accuracy to a hundredth of a mm...
- Fri Jul 02, 2021 7:18 pm
- Forum: micro:bit boards
- Topic: Split a string into a list--help needed
- Replies: 3
- Views: 11899
Re: Split a string into a list--help needed
Fantastic guys! Didn't know that was possible. I greatly appreciate your help. Happy 4th of July. --Jon
- Fri Jul 02, 2021 6:03 pm
- Forum: micro:bit boards
- Topic: Split a string into a list--help needed
- Replies: 3
- Views: 11899
Split a string into a list--help needed
I want to take a numeric value such as -9.472, convert it to a string (OK, I can do that), and then convert the string into a list: my_list, which equals [ "-", "9", ".", and so on. The individual characters will get used on a display. I found the statement below in the online documentation: String....
- Mon May 31, 2021 11:16 pm
- Forum: micro:bit boards
- Topic: TTP229 Micro:Bit MakeCode software
- Replies: 0
- Views: 8626
TTP229 Micro:Bit MakeCode software
Here's an adaptation of code for the Arduino that works nicely on a Micro:Bit connected to a TTP229 keyboard. The keypad unit requires a jumper at the TP1 and TP2 positions located just above the "2" pad on the bottom two rows of solder pads. I recommend using pins and jumper blocks so you can make ...
- Wed May 19, 2021 12:58 pm
- Forum: micro:bit boards
- Topic: Poor I/O pin addressing in micro:python
- Replies: 2
- Views: 12371
Poor I/O pin addressing in micro:python
As far as I can tell, the standard MicroPython I/O control statements such as: pin6.write_digital(0) do not provide a way to change the pin number "on the fly." Thus a program cannot address a series of I/O pins in a loop as you might with: while X < 7 pin(x) .digital_write(my_list[x]) etc... Perhap...
- Wed May 19, 2021 12:52 pm
- Forum: micro:bit boards
- Topic: Disable Micro:Bit buttons A and B?
- Replies: 1
- Views: 11132
Disable Micro:Bit buttons A and B?
Sadly, the lack of contiguous I/O pins, say, P0--P7--on the micro:bit board limits its use in many experiments that require 8-bit ports. We can disable the LED matrix with display.off(). Is there a way to do something similar for the A and B pushbuttons?