battle programmers alliance
Would you like to react to this message? Create an account in a few clicks or log in to continue.

battle programmers allianceLog in

the LivinGrimoire Artificial General Intelligence software design pattern forum

descriptionhello world Arduino LED blink Emptyhello world Arduino LED blink

more_horiz
LivinGrimoireLight link

in the Arduino IDE:
tools: select board and port connecting to the Arduino/elegoo
Sketch->Include Library->Add .ZIP Library...
select the LivinGrimoireLight290724.zip

main code example for hello world:
// the code will blink twice the default Led, Led #13

Code:

#include "DiHelloWorld.h"
#include "LivinGrimoireLight.h"
void setup() {
    Led led1(13); // used to initialize the Hello World skill
    Skill* s2 = new DiHelloWorld(led1); // example skill created
    Chobit* c1 = new Chobit();
    c1->addSkill(s2);
    c1->think(0, 0, 0);
    c1->think(0, 0, 0);
}

void loop() {
}


LED 13 is the built in LED, but if you want to use an added LED here is the Arduino sketch:

hello world Arduino LED blink LED-sketch

DiHelloWorld is the LED skill and it is a preadded skill to get coders used to Arduino LivinGrimoire skill.
it can also be used as boiler plate code to cook up other skills.

note when you are adding the LGL library zip file,
you are simply adding 4 files (LGL .h and .cpp and the LED skill .h .cpp).

descriptionhello world Arduino LED blink EmptyRe: hello world Arduino LED blink

more_horiz
alternative sketch:
hello world Arduino LED blink Fade-led-schematic
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply