Nucleo SPI Sequencer
Dependencies: AverageAnalogIn N5110 Nucleo_rtos_UI_Test PinDetect RotaryEncoder Sequence mbed-rtos mbed FilterController
Fork of Nucleo_rtos_UI_Test by
Diff: main.cpp
- Revision:
- 8:2c481dab525a
- Parent:
- 7:8f38e85705ba
- Child:
- 9:06ba77ce8b3c
--- a/main.cpp Sun Jun 12 08:19:29 2016 +0000 +++ b/main.cpp Sun Jun 12 08:49:34 2016 +0000 @@ -163,6 +163,8 @@ int _step = RotEnc1.getVal(); if (_step != currentStep) { currentStep = _step; + // syncronize sequence value & Rotary Encoder's value + RotEnc2.setVal(sequence[currentStep].getPitch()); isDirty = true; } int _pitch = RotEnc2.getVal(); @@ -247,12 +249,14 @@ Thread thRotEnc(pollingRotEncs, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); Thread thPots(pollingPots, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); + /* for (int i = 0; i < SEQUENCE_N; i++) { Sequence& seq = sequenceSender.getSequences()[i]; - seq.setPitch(i); + seq.setPitch(0); seq.setOctave(0); seq.tie = false; } + */ sequenceSender.run(0); // Main loop