Search found 17 matches
- Tue Jun 01, 2021 6:15 am
- Forum: Programs, Libraries and Tools
- Topic: SSD1306 OLED Display
- Replies: 3
- Views: 5837
Re: SSD1306 OLED Display
Howdy all, After much wrangling around and getting some valuable help I was able to conquer the little oled display to display a simple temp output from the Pi Pico's internal temp sensor. Some notable accomplishments: (for me anyways) Converted Celsius to Fahrenheit Update ONLY temp output as oppos...
- Mon May 31, 2021 11:19 pm
- Forum: General Discussion and Questions
- Topic: Convert str to float
- Replies: 4
- Views: 4151
Re: Convert str to float
Micropython uses 32-bit floats by default, so you only get six significant digits. You can get more digits printed by specifying the number of digits explicitly: >>> print('{:.12f}'.format(lat)) 4030.331611633301 Just don't expect anything beyond 6 significant digits with 32-bit floats. I believe i...
- Mon May 17, 2021 3:45 pm
- Forum: Programs, Libraries and Tools
- Topic: SSD1306 OLED Display
- Replies: 3
- Views: 5837
SSD1306 OLED Display
Hello all, just been playing with my Pi Pico and going through some tutorials and am struggling with getting my little Adafruit SSD1306 OLED display working. Specifically 0.91" 128x32 I have looked through the code example that are listed on the adafruit website and they are for circuit python or py...
- Fri Apr 23, 2021 5:20 am
- Forum: General Discussion and Questions
- Topic: How to print a single statement when button state =(0)
- Replies: 2
- Views: 1997
Re: How to print a single statement when button state =(0)
Could I define a button function statement? Example: def button_on() print('You pressed the button!') def button_off() print('You killed the lights!') Then I could place a call to each function with their respective if statements? But would they not simply print on and on, or would they simply print...
- Fri Apr 23, 2021 4:56 am
- Forum: General Discussion and Questions
- Topic: How to print a single statement when button state =(0)
- Replies: 2
- Views: 1997
How to print a single statement when button state =(0)
Howdy all, Ok so just getting started here and trying to figure some basic code. I have a set of LED's that I have setup to flash when you press a button. This works as coded. I am trying to feedback some basic info back to the terminal window. So in my loop when button state is (1) #'on' it flashes...
- Sat Apr 03, 2021 9:53 pm
- Forum: General Discussion and Questions
- Topic: I am at a loss of how to get started??
- Replies: 14
- Views: 7469
Re: I am at a loss of how to get started??
You can use pyboard.py (found in micropython/tools) to upload a file into memory and execute it. Something like: pyboard.py -d /dev/ttyACM0 name-of--python-file I unfortunately get the following: >robert@mountain-cabin:~/micropython-1.14/tools$ pyboard.py /dev/ttyACM0 blinkpico.py bash: pyboard.py:...
- Sat Apr 03, 2021 5:55 pm
- Forum: General Discussion and Questions
- Topic: Problem with rshell running a series of commands
- Replies: 4
- Views: 2107
Re: Problem with rshell running a series of commands
I am using micropython v. 1.12 and PYB v1.1. connected via usb to raspberry pi 4B with latest version of Raspberry Pi OS. I can manually enter rshell and then enter repl and then type import mm1 and get the simple program to run ok. However, if I run the following code, it does'nt work: $rshell rep...
- Sat Apr 03, 2021 4:18 pm
- Forum: General Discussion and Questions
- Topic: I am at a loss of how to get started??
- Replies: 14
- Views: 7469
Re: I am at a loss of how to get started??
I wanted to say thanks for all the replies and helpful comments posted. The rshell command was what I was seeking so I am grateful for the help getting that installed and working. I find that it is important to know how things work and being able to directly communicate with the hardware via command...
- Fri Apr 02, 2021 11:31 pm
- Forum: General Discussion and Questions
- Topic: I am at a loss of how to get started??
- Replies: 14
- Views: 7469
Re: I am at a loss of how to get started??
Ok, so I was able to open another shell tab and >cat blinkpico.py and copy the contents. Then in the repl I was able to enter 'paste' mode (^E) and paste the program in and use ^D and viola, blinky pico! >>> paste mode; Ctrl-C to cancel, Ctrl-D to finish === import machine === import time === pin = ...
- Fri Apr 02, 2021 11:19 pm
- Forum: General Discussion and Questions
- Topic: I am at a loss of how to get started??
- Replies: 14
- Views: 7469
Re: I am at a loss of how to get started??
Hey Robert, so if your trying to access the repl, why don't you just type >repl ? Duh, knuckle head! :oops: robert@mountain-cabin:~$ rshell -p /dev/ttyACM0 Using buffer-size of 128 Connecting to /dev/ttyACM0 (buffer-size 128)... Trying to connect to REPL connected Retrieving sysname ... rp2 Testing ...