mirror of
https://github.com/aster94/logic-analyzer.git
synced 2026-05-02 08:35:21 +03:00
Some things are ready
-Fixed Scroll reducer. -Some functions were broken down into simpler functions, to facilitate the reading of the code. -The spanish comments were changed to english -Some variables like cursera or curseraf now they have names that give meaning to what they are.
This commit is contained in:
@@ -3,15 +3,11 @@
|
||||
*
|
||||
* Author : Vincenzo
|
||||
* this works using the unofficial STM32 core, more info: https://github.com/rogerclarkmelbourne/Arduino_STM32
|
||||
* Led: PB1
|
||||
*/
|
||||
|
||||
|
||||
#define baudrate 115200 // check if it is the same in processing
|
||||
#define samples 200 // the number of samples you want to take
|
||||
#define boardLed PA1
|
||||
|
||||
|
||||
|
||||
uint16_t initial, state, old_state;
|
||||
uint16_t pinChanged[samples];
|
||||
@@ -26,8 +22,8 @@ void setup() {
|
||||
|
||||
Serial.begin(baudrate);
|
||||
|
||||
pinMode (boardLed, OUTPUT);
|
||||
digitalWrite(boardLed, LOW);
|
||||
pinMode (LED_BUILTIN, OUTPUT);
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
pinMode(PB0, INPUT_PULLUP);
|
||||
pinMode(PB1, INPUT_PULLUP);
|
||||
pinMode(PB2, INPUT_PULLUP);
|
||||
@@ -54,7 +50,7 @@ void startLA() {
|
||||
//delay(1000);
|
||||
|
||||
event = 0;
|
||||
digitalWrite(boardLed, HIGH);
|
||||
digitalWrite(LED_BUILTIN, HIGH);
|
||||
|
||||
reset_timer();
|
||||
initial = GPIOB->regs->IDR;
|
||||
@@ -86,7 +82,7 @@ void loop() {
|
||||
}
|
||||
|
||||
void sendData() {
|
||||
digitalWrite(boardLed, LOW);
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
|
||||
//initial data
|
||||
initial1=initial;
|
||||
|
||||
Reference in New Issue
Block a user