Search found 13 matches

by destoriNAVY
Wed Jan 27, 2021 10:14 am
Forum: MicroPython pyboard
Topic: Why the file I created is not created?
Replies: 15
Views: 8227

Re: Why the file I created is not created?

I uploaded an image that is a screenshot of my monitor screen. In puTTY, I found the 'foo.txt' But, in File Explorer(PYBFLASH), I couldn't find 'foo.txt' the final goal is By creating an image, the image(jpg) file need to be created in file explorer. To do this, I need to create a jpg file in File E...
by destoriNAVY
Wed Jan 27, 2021 8:24 am
Forum: MicroPython pyboard
Topic: Why the file I created is not created?
Replies: 15
Views: 8227

Re: Why the file I created is not created?

foo.txt was not created in my virtual memory. with open("foo.txt", "w") as f: data=f.write("Life is too short, you need python") print(data) os.listdir('/flash') when I used uos.lisdir, there was an error like this, 'NameError: name 'uos' isn't defined' if that code successfully run, is text file cr...
by destoriNAVY
Wed Jan 27, 2021 7:11 am
Forum: MicroPython pyboard
Topic: Why the file I created is not created?
Replies: 15
Views: 8227

Re: Why the file I created is not created?

I cannot understand what you guys said. :(

Code: Select all

import os
with open("foo.txt", "w") as f:
    f.write("Life is too short, you need python")
os.listdir('')
I tried to the 'os.lisitdir('\flash')'
but "foo.txt" was not created.
by destoriNAVY
Wed Jan 27, 2021 5:37 am
Forum: MicroPython pyboard
Topic: Why the file I created is not created?
Replies: 15
Views: 8227

Why the file I created is not created?

with open("foo.txt", "w") as f: f.write("Life is too short, you need python") As I expected, a text file should be created in PYBFLASH(E:), but it is not. How can I generate it? IN PUTTY, when I run that code, it just showed to me '34' but what I want is make 'text file'. What am I doing for solvin...
by destoriNAVY
Tue Jan 26, 2021 12:39 pm
Forum: MicroPython pyboard
Topic: How to change binary data to image?
Replies: 1
Views: 1428

How to change binary data to image?

Hi

I'm using Micropython board V1.1

I'm wondering how to change binary data to image

because I know 'PIL' but, as I know, we cannot use PIL in micropython

So, I need to find another way.

Although I tried to googling, I cannot find anything about changing binary data to image

Can someone help me?
by destoriNAVY
Fri Jan 22, 2021 8:55 am
Forum: MicroPython pyboard
Topic: How to change the bits to binary?
Replies: 2
Views: 2603

How to change the bits to binary?

I wanna know How to change the bits to binary, like 'numpy's frombuffer' import pyb from JPEGdecoder import jpeg with open('photo4.jpg', 'rb') as f: data = f.read() print(data) I have to convert each pixel to binary. frombuffer is also represented in matrix form, I also need such a function. but the...
by destoriNAVY
Thu Jan 21, 2021 1:18 pm
Forum: MicroPython pyboard
Topic: How to run 'numpy' to change that the image to binary bits
Replies: 12
Views: 5713

Re: How to run 'numpy' to change that the image to binary bits

Two things that I cannot understand is First, Is the virtual flash drive that you said 'PYBFLASH (E:)' ?? That drive capacity is barely 88.5Kb, but most jpg file's higher than 100Kb I saw the 'https://github.com/remixer-dec/mpy-img-decoder' but I don't know how to using Second, Is there no way to ch...
by destoriNAVY
Thu Jan 21, 2021 12:54 pm
Forum: MicroPython pyboard
Topic: How to run 'numpy' to change that the image to binary bits
Replies: 12
Views: 5713

Re: How to run 'numpy' to change that the image to binary bits

This can be done by copying the file to the virtual flash drive that shows up when the pyboard is connected to your PC.
But when I connected my pyboard to my PC, there is no virtual flash drive. :(
by destoriNAVY
Thu Jan 21, 2021 12:51 pm
Forum: MicroPython pyboard
Topic: How to run 'numpy' to change that the image to binary bits
Replies: 12
Views: 5713

Re: How to run 'numpy' to change that the image to binary bits

I have the micro python board v1.1

Is the BOOT0 pin that you said P1(DFU)?

the final goal that is to change image to binary type, like 101010101100...

and I wanna make the square waveform using that binary

So, someone said to me using DFU mode for using 'ulab'

Is this way correct?
by destoriNAVY
Thu Jan 21, 2021 8:23 am
Forum: MicroPython pyboard
Topic: How to run 'numpy' to change that the image to binary bits
Replies: 12
Views: 5713

Re: How to run 'numpy' to change that the image to binary bits

the last question that there is 'STM Device in DFU Mode' in Universal Serial Bus controllers

but there is not Pyboard USB Comm Port(COM00) in Ports although I connected pyboard

what do I need to do?