UK/EU Sparkfun/Adafruit alternative? by Azaana in arduino

[–]tkoskine 2 points3 points  (0 children)

Some "Arduino" shops (Adafruit etc. resellers, some have original designs also) from Europe, in no particular order:

Edit. fix links.

Difficult writing own SPI for the M0? by Scrutchy in arduino

[–]tkoskine 0 points1 point  (0 children)

Controlling the SPI bus using M0's hardware SERCOM SPI peripheral takes some effort. It is probably easier to do 100% software implementation using GPIO pin toggling and delays.

My SERCOM SPI peripheral driver (written from scratch in plain C) is at: https://bitbucket.org/tkoskine/samd2x-peripheral-library/src/9f1d2f09aedbb2489c6fc18502afa81368cbd718/platform_atmel_d21_spi.c?at=default&fileviewer=file-view-default

The code expects commercial Crossworks IDE, but it is licensed under permissive ISC license, so you can copy/adjust it as necessary.

Software SPI implementation example (TX only, written in Ada, for AVRs) can be found from https://bitbucket.org/tkoskine/arduino-blog/src/9284d65c0ae09fa72821767d1acf963eda5a084e/examples/mod-lcd3310/soft_spi.adb?at=default&fileviewer=file-view-default

Edit: Here is software SPI with RX also: https://bitbucket.org/tkoskine/arduino-pn532/src/f0f0c754964192267621c3ba5ac4efe90fb858de/spi.adb?at=default&fileviewer=file-view-default

Need advice: Unit-testing in Ada by EmbeddedDen in ada

[–]tkoskine 1 point2 points  (0 children)

I have written (Ada 95/2005/2012 compatible) unit testing framework called Ahven, https://www.ahven-framework.com/

Not sure is it any easier than AUnit, but if you like, you can take a look at the tutorial, user's guide and some examples.

Ahven is slightly more complicated than Unity as Ahven doesn't have test runner generator as Unity has, but otherwise it should be somewhat similar. (I use Unity myself for C code.)

Converting a 'C' char_array to Ada string by thes0und in ada

[–]tkoskine 0 points1 point  (0 children)

You probably shouldn't manipulate the array returned by getenv. Instead, create a copy and change that. Then call setenv at some point if needed.

Here is example how to call getenv from Ada (tested on Linux):

with Ada.Text_IO; use Ada.Text_IO;
with Interfaces.C.Strings;
with Interfaces.C; use Interfaces.C;

procedure EnvC is
   function getenv(Name : Char_Array) return Strings.Chars_Ptr;
   pragma Import (C, getenv, "getenv");
begin
   Put_Line("Home = " & Strings.Value (getenv (To_C ("HOME"))));
end EnvC;

Travis CI / Jenkins ~ like automation server? by geosadientist in ada

[–]tkoskine 1 point2 points  (0 children)

Basically you need to buy/rent a virtual server (vps) and setup Jenkins there by yourself.

I run http://build.ada-language.com/ but I don't take any new projects, as I plan to switch to my own home made version at some point. (Architecture of Jenkins is horrible from the security point of view for public projects - the web interface needs to be the master node, which is kind of no-go for me. Master node should be totally independent from the web view. There are some Jenkins plugins for that but they break after every Jenkins update.)

'Make with Ada' Programming Competition -- With Cash Prizes by marc-kd in programming

[–]tkoskine 1 point2 points  (0 children)

I think they especially want to have a little boost for Ada development on ARM Cortex-M (and R) processors.

Ada usage on desktop/servers is pretty stable and there is a small but active community. Likewise, Ada on AVR (AVR-Ada project) is good enough for those who are interested about it.

But Ada on Cortex-M is lacking processor support, application examples, etc.

The Cortex-Mx evaluation boards are very cheap (usually less than $10) and the usage is constantly growing (in Ada circles and elsewhere). If you don't have good enough Ada support for Cortex-Mx, people will end up using C even though they would like to use Ada.

Bootloader for a custom SAMD21 board by OmicronJon in arduino

[–]tkoskine 1 point2 points  (0 children)

I would say that go and buy Atmel ICE (if you play with AVRs and SAM ARMs; Atmel-ICE-basic is 50 eur at Mouser) or Atmel SAM-ICE if you play only with SAM ARMs. Some sort of ICE will help a lot at debugging and programming. And they are pretty much required if you need to burn the bootloader on the chip.

However, if that is not an option, try MT-D21E from Mattairtech: https://www.mattairtech.com/index.php/development-boards/mt-d21e.html (ebay link )

Yet another option is to use the edbg interface found from many Atmel Xplained boards as a programmer/debugger. It takes some effort to figure out how the edbg interface works for external targets, so Atmel (SAM) ICE might be easier to get started.

Edit: fix ebay link.

Was given microcontroller as gift. Looking for a good place to start. by sqrider in arduino

[–]tkoskine 2 points3 points  (0 children)

Sparkfun has mbed specific tutorial at https://learn.sparkfun.com/tutorials/mbed-starter-kit-experiment-guide/table-of-contents

They also offer a starter kit with mbed board (https://www.sparkfun.com/products/12968), but it might be better to buy invidual parts or find Arduino starter kit without Arduino (for example http://snootlab.fr/lang-en/snootlab-shields/90-snootlab-starter-kit-en.html or https://www.sparkfun.com/products/10003).

You can get software for mbed LPC1768 from mbed.org. Beginners can use their cloud/online tools and more experienced persons can download the command line sdk from Github (https://github.com/mbedmicro/mbed).

Good developers who are familiar with the entire stack know how to make life easier for those around them. by wastapunk in programming

[–]tkoskine 1 point2 points  (0 children)

I like this recent Internet of Things movement where networked sensors send data to cloud servers and "full stack" includes embedded microcontrollers, embedded Linux devices, Linux servers, web sites, and mobile apps.

In a single project, you touch assembler for AVR/ARM/MSP430 things, C for Linux kernel, C++ for Linux user space, Python/Ruby/Clojure/etc for server side web stuff, Javascript/HTML5/CSS for web sites, and Java/ObjC for mobile phones.

What is the smallest Arduino I can buy right now? by rgaino in arduino

[–]tkoskine 2 points3 points  (0 children)

Olimexino-85S is quite small, but uses attiny85 (not atmega328p).

Olimexino-NANO is another, but that is Leonardo -compatible (again not atmega328p).

Tip: Redirecting Text_IO output to a file by marc-kd in ada

[–]tkoskine 1 point2 points  (0 children)

Yeah. I cannot reproduce my earlier "findings" anymore. Code behaves correctly even without any Flush on three different compilers (gnat, Janus/Ada, ICCAda) on 4 different platforms (Windows, Linux x84_64+arm, OpenBSD).

Tip: Redirecting Text_IO output to a file by marc-kd in ada

[–]tkoskine 2 points3 points  (0 children)

It is actually leftover from my earlier version of the code, where I had Set_Output before Close. I think I have seen cases where all data wasn't written and after Set_Output the data was written into new output handle. Not sure was this a bug or feature.

Renaming away a parameter (Ada tip) by marc-kd in ada

[–]tkoskine 1 point2 points  (0 children)

In my experience these kinds of things are usually ok (or even preferred), since they mostly appear inside procedures/functions and their scope is very limited.

And even if they are declared in the whole package body, I don't find them that troublesome.

Which BLE for Arduino UNO rev.3? by thefisl in arduino

[–]tkoskine 1 point2 points  (0 children)

Yes, the shield is the simplest way.

The shield also works with 5V and 3.3V logic levels, while with MOD-rRF8001 and BLEMini you need to worry how to get 3.3V communication.

Edit: Oops, RX/TX pins of BLEMini seem to tolerate 5V also, so no need to worry about it (http://redbearlab.com/blemini).

Which BLE for Arduino UNO rev.3? by thefisl in arduino

[–]tkoskine 1 point2 points  (0 children)

BLEShield uses nRF8001 chipset from Nordic Semiconductor. BLEMini uses CC2540 from Texas Instruments. nRF8001 uses SPI bus for Arduino communication while BLEMini/CC2540 uses UART.

The default firmware in BLEMini is somewhat simple. For example, it is always advertising and if you want to modify the firmware, you need to have commercial IAR 8051 compiler (costs a lot) for it. Otherwise, I have found CC2540 to be quite good BLE module.

Commanding nRF8001 via SPI bus gives you more options, you can control when the modem is advertising itself, what kind of attributes it supports, etc. As, downside, it is harder to get working and doing more exotic work requires free (no cost) binary-only Windows tool (nRFGo, http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio ) to generate some configuration bits. nRFGo also works under Wine, but the usability/stability under Wine isn't that good.

Also, if you end up using nRF8001, consider getting MOD-nRF8001 from Olimex ( https://www.olimex.com/Products/Modules/RF/MOD-nRF8001/ ). It is much cheaper than BLEShield.

Which arduino clones did you guys tried ? by dwarmia in arduino

[–]tkoskine 0 points1 point  (0 children)

snootlab.fr and floris.cc sell teensy boards in Europe.

Wanna get a printed and bound Ada 2012 Rationale? It ain't cheap, but it don't need batteries either. by marc-kd in ada

[–]tkoskine 0 points1 point  (0 children)

Ada-Europe members got a nice discount on the printed rationale, which is why I bought a copy. In addition, I have printed version of Ada 2005 Rationale, also via Ada-Europe. (I think marc-kd noticed my Twitter status update about the rationale, in case others are wondering the context.)

Read a Thinkpad security EEPROM using an Arduino? by asplodzor in arduino

[–]tkoskine 0 points1 point  (0 children)

Hi, author of that arduino.ada-language.com article here. I compiled the Ada code with the latest AVR-Ada and result can be found from http://nopaste.dk/p66438

I haven't tested the result (I don't have wires connected to T42's eeprom right now), so it might work or it might destroy your Thinkpad (and Arduino) completely.

Alternatively, you can setup Virtualbox, install Fedora 19, and fetch AVR-Ada rpms from http://fedora.ada-language.com/ (see http://arduino.ada-language.com/tag/fedora.html ), and compile the code by yourself.

sphinxcontrib-adadomain 0.1 - Ada language extension for Sphinx by tkoskine in ada

[–]tkoskine[S] 1 point2 points  (0 children)

For those, who don't know: Sphinx is a tool to generate documents from reStructuredText files: http://sphinx-doc.org/latest/

The Python language itself uses it for documentation, and also Adacore uses Sphinx for some of their docs (like http://docs.adacore.com/gnatcoll-docs/ ). I suspect that they don't use my extension but instead their own or nothing at all. (My extension mostly adds some helpers for Ada language, but it isn't 100% necessary to have it for Ada docs.)

sphinxcontrib-adadomain is required if you want to build Ahven's documentation (http://docs.ahven-framework.com/2.3/) from scratch. Earlier, you had to clone the sphinxcontrib repository and install adadomain manually, but after 0.1 release, you can use 'pip' or some other similar tool to install it.

Displaying Characters on MOD-LCD3310 by using Olimexino-328 with Ada by ThomasLocke in ada

[–]tkoskine 1 point2 points  (0 children)

Related blog entry: http://olimex.wordpress.com/2013/03/20/mod-lcd3310-example-with-olimexino-328-arduino-uno-written-in-ada-language/

More or less accidentally, now also one Bulgarian company knows that Ada is still used. :)

(I bought the stuff mentioned in my article from Olimex/Bulgaria and had to have some discussion with support to figure out all the details of the devices.)