Search found 988 matches

by basicchip
Mon Oct 14, 2019 3:43 pm
Forum: Software issues
Topic: ArmBASIC - contact debouncing
Replies: 7
Views: 1751

Re: ArmBASIC - contact debouncing

And the code above is being added as DEBOUNCE.bas in the Examples.
by basicchip
Mon Oct 14, 2019 1:53 am
Forum: Software issues
Topic: ArmBASIC - contact debouncing
Replies: 7
Views: 1751

Re: ArmBASIC - contact debouncing

That was a small pushbutton, big toggle switches may bounce longer. If you have a scope you can take a look. If not it you see multiple . printed you need to increase the time. So here is bigger push button, which is normally a good debounce, but if you do half or slow push/release you can get some ...
by basicchip
Mon Oct 14, 2019 12:14 am
Forum: Software issues
Topic: ArmBASIC - contact debouncing
Replies: 7
Views: 1751

Re: ArmBASIC - contact debouncing

Buttons and switches bounce, and you have to take that into account. The easiest way is to look for a change in the button then ignore all other changes for a certain debounce time. That can vary a lot depending on the switch. I set up a simple test case on an ARMstamp with a push button between 2 p...
by basicchip
Mon Oct 14, 2019 12:11 am
Forum: Projects
Topic: Darken Ship - via ARMstamp
Replies: 3
Views: 963

Re: Darken Ship - via ARMstamp

Buttons and switches bounce, and you have to take that into account. The easiest way is to look for a change in the button then ignore all other changes for a certain debounce time. That can vary a lot depending on the switch. I set up a simple test case on an ARMstamp with a push button between 2 p...
by basicchip
Wed Oct 09, 2019 4:09 am
Forum: Kitchen sink
Topic: WAIT in a MultiTasking program
Replies: 3
Views: 1149

Re: WAIT in a MultiTasking program

I would advise against using WAIT in a multitasking program. It would be better to relinquish your task to the next one. If you were waiting at the end of the task, on the next entry to it, check the TIMER to see if the minimum WAIT time had passed. Much better to read the TIMER yourself and do the ...
by basicchip
Tue Oct 08, 2019 4:02 am
Forum: Software issues
Topic: ABS & NOT
Replies: 1
Views: 552

Re: ABS & NOT

Logical and bitwise expressions in BASIC use the same named function. It depends on context which one gets applied.

toggled = 1

bitwise NOT toggled = &HFFFFFFFE

ABS (&HFFFFFFFE) = 2 ' because &HFFFFFFE = -2

bitwise NOT 2 = &HFFFFFFFD ' which = -3

so ABS (-3) = 3

...
by basicchip
Tue Sep 17, 2019 12:49 am
Forum: Kitchen sink
Topic: Simple Benchmarks
Replies: 7
Views: 2353

Re: Simple Benchmarks

As part of the Kickstarter for uChip, someone asked about performance of BASIC. So I did a quick comparison of my benchmarks in C vs BASIC. Turns out the integer benchmark runs about the same for C and BASIC. Not real surprising as not much to optimize there. The float benchmark threw me for a bit o...
by basicchip
Sat Sep 07, 2019 7:07 pm
Forum: Future products
Topic: BASIC for Arduino ARM
Replies: 10
Views: 3380

Re: BASIC for Arduino ARM

And the Kickstarter is off and running.

Check it out and join the community, I'll refund the dollar for people with a PayPal account.

https://www.kickstarter.com/projects/70 ... ero-boards
by basicchip
Wed Sep 04, 2019 7:58 pm
Forum: Kitchen sink
Topic: Documentation, broken link
Replies: 59
Views: 43947

Re: Documentation, broken link

We rely on the many eyes looking over our shoulder at the documentation. So keep us honest and keep letting us know about broken links, misspelling, bad grammar, or wrong info.

thanks in advance.
by basicchip
Wed Sep 04, 2019 7:56 pm
Forum: Kitchen sink
Topic: Simple Benchmarks
Replies: 7
Views: 2353

Re: Simple Benchmarks

Microbit numbers now posted at the list in the blog.

https://www.coridium.us/coridium/blog/some-benchmarks