Coder Social home page Coder Social logo

Multiple .pde files about deviot HOT 5 CLOSED

gepd avatar gepd commented on May 29, 2024
Multiple .pde files

from deviot.

Comments (5)

gepd avatar gepd commented on May 29, 2024

It should work without modification, do you have any place where I can download the files and test it?

from deviot.

thomsna avatar thomsna commented on May 29, 2024

Here is a sample project: https://dl.dropboxusercontent.com/u/7038123/pde-test.zip

It's using this library: https://github.com/gioblu/PJON

from deviot.

gepd avatar gepd commented on May 29, 2024

Sorry for the delay @thomsna

I'll copy the answer from the PlatformIO team

I think that approach with alphabetically sorted .pde files is quite limited, but you always can include one .pde file into other via #include "file.pde" with "include guard"

a-test.pde:

#ifndef _A_TEST_PDE_
#define _A_TEST_PDE_
#include <PJON.h>
#endif  //_A_TEST_PDE_

z-main.pde:

#include "a-test.pde"

PJON network(12); // Bus connection to pin 12

void setup() {

  PJON network(12, 45); // Bus connection to pin 12

  network.send(44, "B", 1, 1000000);
  // Send to device 44, "B" content of 1 byte length every 1000000 microseconds (1 second)
}

void loop() {
  network.update();
}

If you try that example it's working now.

Additionally, the PlatformIO team has included the PJON library in his library manager. So now you can go to Deviot > Search Library search PJON and install the library with a few clicks.

from deviot.

thomsna avatar thomsna commented on May 29, 2024

Your solution works, thanks.
You're right, it's much more flexible that way.

from deviot.

gepd avatar gepd commented on May 29, 2024

I'm happy to help you

from deviot.

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.