Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cb17e4f
added gyro sensor
vhoogendijk May 9, 2025
7cfb301
added fixes from testing
vhoogendijk May 9, 2025
56b6923
fixed write to ble blecharacc
vhoogendijk May 12, 2025
4c363b0
added code (rotation around gravity) from pr #35
vhoogendijk May 15, 2025
72091aa
rotation detection and gate execution
vhoogendijk May 15, 2025
e4017f7
arduino sketch to test pauli gates
vhoogendijk May 15, 2025
3eec61c
animation for pauli gates
vhoogendijk May 16, 2025
76cb79b
Make vectors from gravity and gyro
May 16, 2025
c3e643d
Merge pull request #1 from ardjuh/feature/gyro-vector
ardjuh May 16, 2025
f9cf6c7
Add shaking detection
May 16, 2025
50a1743
implemented gates using matrices from Eigen
vhoogendijk May 16, 2025
b484ac4
Merge main
May 16, 2025
555b987
Merge pull request #2 from pitkro/useMatrixGates
ardjuh May 16, 2025
2f29fec
Use tap detection for collapsing
May 16, 2025
c953579
Make accelerometer optional
May 19, 2025
e74fb7d
Switch axis
May 19, 2025
035f7cc
Enable tap freezing
May 19, 2025
31f78df
added partial rotation and animations using matrices
vhoogendijk May 19, 2025
e1b37ee
Merge pull request #3 from pitkro/useMatrixGates
vhoogendijk May 19, 2025
65cd414
added last changes from partial rotations
vhoogendijk May 19, 2025
7f647f1
Make code more clean
May 19, 2025
8765628
Make code more clean
May 19, 2025
248ae6a
Remove unused code
May 19, 2025
ba927d4
rotation of gate matches rotation of turn
vhoogendijk May 20, 2025
8b9f921
Got rid of warning from unit conversion
vhoogendijk May 20, 2025
148ff63
Merge branch 'useMatrixGates'
vhoogendijk May 20, 2025
5a70758
fixed issue when Serial wasn't available
vhoogendijk May 20, 2025
3fd56ff
Move animation to Qbead.h
May 20, 2025
38c1a20
Fix collapsing
May 20, 2025
b62c22a
shaking function
vhoogendijk May 23, 2025
26a0704
removed print statements
vhoogendijk May 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/IMU_reader/IMU_reader.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Qbead::Qbead bead;

void setup() {
bead.begin();
bead.startAccelerometer();
bead.setBrightness(25); // way too bright
Serial.println("testing all pixels discretely");
for (int i = 0; i < bead.pixels.numPixels(); i++) {
Expand All @@ -25,6 +26,6 @@ void setup() {
void loop() {
bead.readIMU();
bead.clear();
bead.setBloch_deg_smooth(bead.t_acc, bead.p_acc, color(255, 0, 255));
bead.setLed(Qbead::Coordinates(bead.gravityVector), color(255, 0, 255), true);
bead.show();
}
51 changes: 51 additions & 0 deletions examples/PauliGate_detection/PauliGate_detection.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#include <Qbead.h>

Qbead::Qbead bead;
int rotationState = 0;
uint32_t stateColor = color(255, 255, 255);
const bool toggleAnimationOn = 1;

void setup() {
bead.begin();
bead.setBrightness(25); // way too bright
Serial.println("testing all pixels discretely");
for (int i = 0; i < bead.pixels.numPixels(); i++) {
bead.pixels.setPixelColor(i, color(255, 255, 255));
bead.pixels.show();
delay(5);
}
Serial.println("testing smooth transition between pixels");
for (int phi = 0; phi < 360; phi += 30) {
for (int theta = 0; theta < 180; theta += 3) {
bead.clear();
bead.setBloch_deg(theta, phi, colorWheel_deg(phi));
bead.show();
}
}
Serial.println("starting inertial tracking");
}

void loop() {
bead.readIMU(false);
bead.clear();
bead.showAxis();
stateColor = color(255, 255, 255);
Serial.print("rotationState: ");
Serial.println(rotationState);
if (bead.frozen)
{
stateColor = color(122, 122, 0);
}
else
{
rotationState = bead.checkMotion();
if (rotationState != 0)
{
bead.frozen = true;
bead.T_freeze = millis();
}
}
bead.animateTo(rotationState, 2000);
bead.setLed(bead.visualState, stateColor);
bead.show();
}
Loading