Coder Social home page Coder Social logo

need some pointers please about usbvalve HOT 11 CLOSED

cecio avatar cecio commented on September 21, 2024
need some pointers please

from usbvalve.

Comments (11)

cecio avatar cecio commented on September 21, 2024

Hey.

If you managed to get the "Mydrive" mounted, this means that the firmware has been uploaded correctly. Also the file you see are expected and are part of the filesystem itself.
If, despite this, you don't see anything on the screen, there are two possibilities:

  • defective device (unlikely, did you see it working with the original firmware? Or can you upload the original firmware to test?)
  • the device is not fully compatible with the one I used to create the firmware

Unfortunately there are a lot of different way to wire up LCD to the Pi Pico and if the one you bought is not the same as the one I used to create the firmware, it requires some modification to work.

The best thing here is to obtain the schematics of the connection of your PI watch if available, so we can check the PINs used to connect the LCD and see why it is not working.

from usbvalve.

copywizard avatar copywizard commented on September 21, 2024

Hey.

If you managed to get the "Mydrive" mounted, this means that the firmware has been uploaded correctly. Also the file you see are expected and are part of the filesystem itself. If, despite this, you don't see anything on the screen, there are two possibilities:

  • defective device (unlikely, did you see it working with the original firmware? Or can you upload the original firmware to test?)
  • the device is not fully compatible with the one I used to create the firmware

Unfortunately there are a lot of different way to wire up LCD to the Pi Pico and if the one you bought is not the same as the one I used to create the firmware, it requires some modification to work.

The best thing here is to obtain the schematics of the connection of your PI watch if available, so we can check the PINs used to connect the LCD and see why it is not working.

Thanks for the quick reply i didn't expect there would be so much different possibilities for wiring a lcd to a pi pico.

I have added a picture of the labeled pins maybe this could help?

PXL_20240407_102031182

I also do not think its a defective device because i worked when i got it in but it would just not accept any UF2 files so i could not flash anything.

today i will try and to upload the original firmware if i can find it somewhere and hopefully i can use arduino ide to upload it i have no idea how to decompile a UF2 to its raw format or if this is even possible?

edit: unfortunately the original firmware does not come i a format ardruino ide can read i think?
https://github.com/dawigit/picoclock

P.s.s. I think i know where it went wrong

In Arduino IDE i tried to uncomment "if defined(PIWATCH)" but if i do so it crashes while compiling because "#else" is still uncommented. then when i uncomment else i get the error " #endif" is the problem saying #endif without #if.

I,am not a skilled programmer as of yet so i know this has to do with the uncommenting because when i comment everything then it runs fine but offcourse it does not treat the device as a waveshare 1.28 inch round lcd or piwatch ;)

Can you tell me please what i need to fix to uncomment the if definded(PIWATCH)

from usbvalve.

cecio avatar cecio commented on September 21, 2024

Model looks the same as mine.

If you uploaded the firmware through Arduino IDE, you probably re-compiled it. Did you un-commented the following

// Uncomment the following to compile for the RP2040 based TFT round display
// https://www.raspberrypi.com/news/how-to-build-your-own-raspberry-pi-watch/
//#define PIWATCH

Otherwise you are uploading the wrong version. Anyway, the easiest way is to upload the UF2.

from usbvalve.

copywizard avatar copywizard commented on September 21, 2024

Model looks the same as mine.

If you uploaded the firmware through Arduino IDE, you probably re-compiled it. Did you un-commented the following

// Uncomment the following to compile for the RP2040 based TFT round display
// https://www.raspberrypi.com/news/how-to-build-your-own-raspberry-pi-watch/
//#define PIWATCH

Otherwise you are uploading the wrong version. Anyway, the easiest way is to upload the UF2.

Thats it i think i just don,t know what i should comment and uncomment?

from usbvalve.

cecio avatar cecio commented on September 21, 2024
//#define PIWATCH

should become

#define PIWATCH

Then compile and upload again

from usbvalve.

copywizard avatar copywizard commented on September 21, 2024

Nearly there i hope

i have this in there now

#define PIWATCH

#include <Arduino_GFX_Library.h>
#include "background.h"

#else

#include "SSD1306AsciiWire.h"

#endif

and i get this error

exit status 1

Compilation error: #else without #if

from usbvalve.

cecio avatar cecio commented on September 21, 2024

No, you messed up something, it looks like you removed a line.

If you just un-comment that line, you should not get any errror. Start from the clean source and just un-comment line 24.

Then recompile (assuming you are using Arduino IDE with the proper libraries listed in the repo)

from usbvalve.

copywizard avatar copywizard commented on September 21, 2024

Copied the code from here

https://github.com/cecio/USBvalve/blob/main/USBvalve/USBvalve.ino

And pasted it in Arduino IDE uncommented the piwatch part

still the same error.

could it be that you say to uncomment "//#define PIWATCH" but in your own code it says "#if defined(PIWATCH)"

I,am very sorry if i ask alot of questions and are very grateful for your quick help and responses!

from usbvalve.

cecio avatar cecio commented on September 21, 2024

you are referring to line 31

Look at line 24. Commens in C are not # but //

So your line 24 should be like this to work:

#define PIWATCH

from usbvalve.

copywizard avatar copywizard commented on September 21, 2024

Damn that did the trick! thanks very much and sorry i think i just can't count :(

Still does not fix the flashing issue but that a whole other problem i have a screen right now!

from usbvalve.

cecio avatar cecio commented on September 21, 2024

Great! Happy it worked! :-)
Thanks!

from usbvalve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.