Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TriggerMultiplier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpibr
scic
TriggerMultiplier
Commits
7842a65e
Commit
7842a65e
authored
2 months ago
by
Friedrich Kretschmer
Browse files
Options
Downloads
Patches
Plain Diff
added missing variables
parent
78dcc045
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
triggerMultiplier.ino
+18
-0
18 additions, 0 deletions
triggerMultiplier.ino
with
18 additions
and
0 deletions
triggerMultiplier.ino
+
18
−
0
View file @
7842a65e
// Define the pin numbers
const
int
INPUT_TTL_PIN
=
2
;
// Example pin number for input TTL
const
int
OUTPUT_TTL_PIN
=
3
;
// Example pin number for output TTL
const
int
LED_PIN
=
13
;
// Example pin number for LED
// Define other necessary variables
int
ttlFactor
=
1
;
// Default TTL factor
bool
wasTTLDetected
=
false
;
// Flag to check if TTL was detected
bool
wasTimeoutDetected
=
false
;
// Flag to check if timeout was detected
unsigned
long
lastTtlTime
=
0
;
// Last time TTL was detected
unsigned
long
lastManualTtlTime
=
0
;
// Last time manual TTL was triggered
unsigned
long
ttlTimeoutInterval
=
0
;
// Timeout interval for TTL
int
pulseWidth
=
5
;
// Default pulse width
int
outputInterval
=
10
;
// Default output interval
int
inputInterval
=
40
;
// Default input interval
int
previousTriggerLineState
=
LOW
;
// Previous state of the trigger line
int
currentTriggerLineState
=
LOW
;
// Current state of the trigger line
void
setup
()
{
void
setup
()
{
pinMode
(
INPUT_TTL_PIN
,
INPUT
);
pinMode
(
INPUT_TTL_PIN
,
INPUT
);
pinMode
(
OUTPUT_TTL_PIN
,
OUTPUT
);
pinMode
(
OUTPUT_TTL_PIN
,
OUTPUT
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment