Comments (10)
I've noticed something which maybe matters (or maybe not).
In nrf.c
the type declaration for number_of_ms
is uint32_t
while in LED.cpp, the length param is uint8_t
from arduino-library.
Looks like the underlying nrf_delay_us
function is not working. Try this code and both lights will be on continually.
#include <Arduino.h>
LED led;
void setup() {
animation.rainbows();
}
void loop() {
led.on(1, "magenta", 100000);
uint32_t delay = 5000;
nrf_delay_us(delay);
led.on(2, "red", 100000);
nrf_delay_us(delay);
}
from arduino-library.
5000 microseconds is not a very long time at all.
from arduino-library.
from arduino-library.
nrf_delay_ms is milliseconds, it's in the same nrf_delay.h file.
from arduino-library.
from arduino-library.
These docs are wrong then
Each LED on the Jewelbot is refferred to by a number 0 through 3, which are called pins (i.e. pin 0, pin 1, etc). There are 4 different LEDs on the Jewelbot to control.
There is a set amount of pre-made color addresses for the Jewelbot.
* orange
* blue
* pink
* red
* violet
* magenta
* green
Time is addressed in milliseconds (i.e. if you want to have the LED on for 2 seconds, you'd write 2000
from arduino-library.
It doesn't appear it is working with microseconds either.
Given this code, I just see one color sometimes magenta, sometimes red.
#include <Arduino.h>
LED led;
void setup() {
}
void loop() {
led.on(1, "magenta", 1000000);
led.on(1, "red", 1000000);
}
from arduino-library.
Looks like type conversion / variable layout or something is causing the problem.
If i run this code, I will see different color blips every second.
void loop() {
uint32_t delay = 1000000;
led.on(1, "magenta", 1);
nrf_delay_us(delay);
led.on(1, "red", 1);
nrf_delay_us(delay);
}
This code however does not work properly while led.on
is calling nrf_delay_us()
, the same function.
void loop() {
uint32_t delay = 1000000;
led.on(1, "magenta", delay);
led.on(1, "red", delay);
}
from arduino-library.
Fixed with #14
from arduino-library.
Related Issues (18)
- Compile Issue with Error Message HOT 7
- Repo size discussion (Presently 797.52 MB) HOT 6
- Consistent error seen when attempting to upload to JDB HOT 21
- Developer Guidance? HOT 4
- package_jwb_staging_index.json is a 404 HOT 1
- BLE services / characteristics HOT 9
- Board package URL in README.md is a 404 HOT 12
- setup() function is not invoked HOT 2
- Error updating firmware on Ubuntu HOT 3
- Feature Request: Finer control of buzzer duration HOT 4
- Example from the main readme fails to compile HOT 2
- LED function parameters are misleadingly named HOT 1
- Feature Request: provide a millis function HOT 2
- error where JB locks up HOT 6
- Pull get_rand_int over to this board as well HOT 1
- Bring the new colors over to the breathing animation
- Add Bouncing Ball to Solo Board HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-library.