Giter Site home page Giter Site logo

Comments (33)

bxparks avatar bxparks commented on June 19, 2024

The restriction to ESP8266 and ESP32 is not intentional. They are just the only wifi enabled chips that I have. If you have suggestions on how to support other boards, I'd be happy to review them.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

I'm not sure what you want me to do. I don't have that board, I can't test my code against it, so my code doesn't support it.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

Let me know when you verify that it works. As a rule, I don't include code that has not been tested to work.

Also, can you submit a proper pull request on GitHub so that I see the diff and use the normal code review process? It will also allow the code history to have proper attribution. If you don't know how to do that, I can do the diff and merge manually, but it's more work so I'll get around to it eventually..

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

I looked up the specs for the Nano 33 IoT. It uses a SAMD21 Cortex-M0+ talking to an embedded ESP32 handle the WiFi and bluetooth. Just wondering, why not use a ESP32 board directly? It'll be cheaper, with one fewer component to go wrong and debug. If something doesn't work, you'll never be sure that they implemented the communication between the two chips correctly.

In any case, send me the minimal amount of changes needed to support your use case. The less the code, the easier it'll be to review it.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

You mean the various printTo() methods? Not right now. Just to double-check, your display library does not provide a class that implements Print? Because if it does, that's what you want to use.

Otherwise, the closest thing that I can recommend is to create something like my FakePrint class. Basically, you "print" to an in-memory buffer, then you get the result using the FakePrint.getBuffer() method.

I might be able to implement something useful this weekend. It seems like something that other people could use. The reason that I am reluctant to use a String is because it performs dynamic allocation of memory, which is terrible on a chip with only 2kB of RAM. I really want to make sure that AceTime performs no dynamic memory allocation.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

The Oled object pretends to be a Serial port. More precisely, both the Oled object and the Serial object are subclasses of the Print class. Your display library, if designed for the Arduino world, should provide a similar object.

Printing to a fixed buffer is not as easy as it sounds. The process of printing a date/time/timezone involves passing the buffer around to multiple objects, which then requires keeping a running count of how many characters were printed, so that things don't go off the cliff at the end of the buffer, causing the so called "buffer overrun". That's what the FakePrint encapsulates.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

I can assume anything I want because it's my library, that I created for me, not for you or anyone else. If it works for you, that's great. If it does not, you can propose solutions, but you are not currently winning any favors by whining on the sidelines.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

I added a ace_time::common::CstrPrint class that might help with this. See the following for some sample code:

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

I'm glad that the code is working for you.

But I am unable to undersetand from your recent emails what changes you want to make to the AceTime code. You seem to assume that you uploaded something, but I don't see it. You seem to assume that I am familar with various 3rd party packages that you are using, like GUIslice, but I am not.

If you would like to make some changes to AceTime, send me a GitHub Pull Request.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

There is no ZIP file because you are not sending them to me directly. You are sending them to GitHub, which probably strips attachments out for security purposes.

I asked a couple of times that you should send me a Pull Request, or a diff of the minimal changes you would like to make to the AceTime library. Instead, you seem to be trying to send me your entire program. What do you want me to do with it? Figure out what changes you made to my project? This is not a worthwhile use of my time and effort.

So I'm going to close this ticket, because I cannot figure out what you want me to do. I'm glad you were able to use my library. Consider it my free gift to you.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

The best way to show someone else your code is to create a GitHub project, upload your code to it, then send them a link to your project.

The usual way to send changes to someone else's project is to "fork" the project in GitHub, make your changes on your computer, upload the changes to your own fork, then send a Pull Request (PR) from your fork to the original project. See help page could be useful: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork . There are many many other resources available on the web.

If you are new to 'git' or GitHub, you have a lot of adventure ahead of you to learn those tools. You can get some amount of practice by using git, and sending Pull Requests to yourself for your own projects, before you start sending other people those things.

For very small changes, you can sometimes get away with sending a 'diff' file. This is created by a command called 'diff' (assuming you are using Linux or MacOS). If you are on Windows, sorry can't help you. You might be able to use CygWin on Windows, but if you know about CygWin, then you don't need me to explain this stuff to you.

I hope that gives you some pointers in the right direction.

from acetime.

dduehren avatar dduehren commented on June 19, 2024

from acetime.

bxparks avatar bxparks commented on June 19, 2024

I have to ask you go somewhere else to learn the basics about git and GitHub. I'm not your private tutor, and this is not the place for asking such things. Good luck on your projects though.

from acetime.

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.