Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:59 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Email from Guatemala

     Page 1 of 2    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 10:14pm 29 Oct 2014
Copy link to clipboard 
Print this post

This email was sent to me by Raul Herrera in Guatemala and I am reproducing it here (with Raul's permission) for everyone's interest.

It just shows what you can do with a little computer and BASIC...

I live in Guatemala http://en.wikipedia.org/wiki/Guatemala, and I am an engineer, not in electronics but information systems, electronics its a hobby, this year the sports ministry, call for a solution for the october 16 disaster http://en.wikipedia.org/wiki/Estadio_Mateo_Flores, the stadium was closed for the incident during 15 years, and now, that is remodalated, and certified to hold 30000 people, the security doors, and all the security have to be made from scratch.

I took and Duinomite mini and develop all the comunication for the whole stadium, that means, a central control unit, that with the push of a button opens or closes any door, with a monitor to display the state of all door, 3km of cable UTP was necesary, max 485 and a ring of communications.






sorry for the bad photos,( if you are interested can send you the final document with HD)

We have to run fast with the modules in each door, I choose Microhip PIC 12f683 that comunicates the state of each door and chance the state of the lock, use a duty for querie the state each 1.2 seconds,







I have to use perforated PCB cause the humidity and the heat caused trouble with the original 7805, I have to put heat discipation and build all the 8 modules from the night to the day.




This is a close up for the magenic locks



Those are the doors to the field, before

And this is the location of the stadium, by the way is the biggest in central america

https://www.google.com.gt/maps/place/Estadio+Nacional+Mateo+ Flores/@14.6258,-90.51013,1113m/data=!3m2!1e3!4b1!4m2!3m1!1s 0x0:0x1902c611b6c0d6b4

For all the last, thank you so much, I think you could find some gratification knowing that you have helped a small country and possibly save lifes thru your software that have worked flawless. thanks again.

And for final recall, I work with linux, and I do not know a good terminal software to program the mmbasic, for the whole project I was forced to carry a vga monitor and a ps2 keyboard (USB adaptor) .... =o( I used putty, screen, miniterm.py, and other and nothing works ok, specially with the edit command, is there a way to create alternatives to save, or simply change the question when i push esc, the default could by yes save, instead of no, not save or perhaps CTRL-something??.

I never heard before this advantages on the duinomite, but they make a difference, the things that I have found that lead my to choose a duinomite were:

- Excelent practices, source are interpretated, that means source recide in the chip and is guarantee that is the version that runs.
- Excelent practices, sources are allways ready at hand, and i can have multiple version with different names.
- Excelent practices, no need for anything else but the board itself (well, the damn monitor and keyboard, hope this could be changed =o) )
- No OS, this is not true, cause of course there is a OS, minimal if you want, but the startup is instantaneous.
- Run anything unantended thru autorun.bas
- Excelent voltage manager, (not mini by the way, i did not used mini for the final project only for development) it is industrial capable.
- BASIC, what else can i say?
- Big monitor capable
- Sound capable, (in the final stage we have rid of it, but a nice feature indeed)
- Lighting fast for a domotic or mechatronic projects. (not for math killer alghoritms, but what the hell)
- I2C, UART support (I used UART and 485 for the distance)
- Attainable, means cheap (tens of dollars, not hundreds), easy to get (amazon, mouser, ebay) for my country.

What a i really hated:

- The only way to get the source code for backup is thru the SD card, (i remember a version that converts the USB in a storage device, very handy)
- That 19" monitor and keyboard (they are still in my car, because the period of beta testing is not finished =o(

Thank you for your attention.

Best Regards, good work.


--
Raul Herrera


Geoff Graham - http://geoffg.net
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 10:35pm 29 Oct 2014
Copy link to clipboard 
Print this post

Wow, that's pretty cool.

Raul is using RS485 communications to 8-pin microcontrollers over 3km of wire.

Good job Raul.

Lou
Microcontrollers - the other white meat
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 12:39am 30 Oct 2014
Copy link to clipboard 
Print this post

Cool stuff!

Geoff - I'm happy to suggest Linux things for him if he wants ideas. Either via posts here (probably best) or email if needs be.

(I even have a duinomite in case that helps.)

JohnEdited by JohnS 2014-10-31
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 01:21am 30 Oct 2014
Copy link to clipboard 
Print this post

Not long ago I shipped five ICeemite modules to Guatemala. Could be a coincidence. Or not...

http://rittle.org

--------------
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 02:29am 30 Oct 2014
Copy link to clipboard 
Print this post

@Geoff/Raul

that's amazing! A really cool project!

  Quote   specially with the edit command, is there a way to create alternatives to save, or simply change the question when i push esc, the default could by yes save, instead of no, not save or perhaps CTRL-something??.

I'm not sure if I missed something, but I use F1 if I want to leave the EDIT mode and want to SAVE (to ProgMem, not SD).

(I have a Duinomite too in case I could help.)

Michael
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 06:46am 01 Nov 2014
Copy link to clipboard 
Print this post

wow mmbasic in the real world !
i like the idea . Cool Raul.

 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 06:57pm 07 Nov 2014
Copy link to clipboard 
Print this post

Hello Forum members, my name is Raul Herrera, I am responsable for the project Groffg kindly posted here, thank you for your attention, I am an Information Systems Engineer, Embedded electronics engineer, System administrator, University Teacher, I have a MBA, and by the way single father of three, long life i think, at your service.

 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 06:59pm 07 Nov 2014
Copy link to clipboard 
Print this post

  Lou said   Wow, that's pretty cool.

Raul is using RS485 communications to 8-pin microcontrollers over 3km of wire.

Good job Raul.

Lou


That is not completely correct, 3Km is the whole cable for the project, the longest run is about 800m, is the ring around the stadium.

Best Regards
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 07:02pm 07 Nov 2014
Copy link to clipboard 
Print this post

  JohnS said   Cool stuff!

Geoff - I'm happy to suggest Linux things for him if he wants ideas. Either via posts here (probably best) or email if needs be.

(I even have a duinomite in case that helps.)

John


Yes please, thank you, best regards
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 07:07pm 07 Nov 2014
Copy link to clipboard 
Print this post

  twofingers said   @Geoff/Raul

that's amazing! A really cool project!

  Quote   specially with the edit command, is there a way to create alternatives to save, or simply change the question when i push esc, the default could by yes save, instead of no, not save or perhaps CTRL-something??.

I'm not sure if I missed something, but I use F1 if I want to leave the EDIT mode and want to SAVE (to ProgMem, not SD).

(I have a Duinomite too in case I could help.)

Michael


That is right, but ....

The main problem is that terminal in linux, like putty, screen, miniterm.py, etc... are not capable for pushing Fn keys, because the graphical interface normaly interrupt those keys, and for a laptop computer is not so useful without graphics interface.

That is why I have to carry monitor and keyboard ... and laptop computer all the time.

That causes other problems, to update software or simply make a backup, because I only have monitor and keyboard and not a computer on the other side of the cable I must use SD card for commute the code between devices.

That is why I took the liberty to ask Geoffg if something can be done.

Hope I clarified that issue.

Best Regards.
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 07:18pm 07 Nov 2014
Copy link to clipboard 
Print this post

  kiiid said   Not long ago I shipped five ICeemite modules to Guatemala. Could be a coincidence. Or not...


Well not necessarily a coincidence, normally we ask the parts vendor to send to Miami and later send here, We have excellent courier services from Miami to Guatemala, and the delivery time decrease exponentially to ship to USA. I assume whats happened is that somebody took the chance to ship it directly.

Only my pupils imports more than 200 duinomites from mouser, and normally there are clones, alike or similarities around, your product seems interesting, and have a good price, I am sure must be many in the country, only that have asked to send to Miami, and you did not realize that those are going to be send to others countries.

Only a guess of course.

Best Regards.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 09:28pm 07 Nov 2014
Copy link to clipboard 
Print this post

  rherrera72 said  
  JohnS said   Cool stuff!

Geoff - I'm happy to suggest Linux things for him if he wants ideas. Either via posts here (probably best) or email if needs be.

(I even have a duinomite in case that helps.)

John


Yes please, thank you, best regards


Hi Raul - good to see you here!

Ok, so, is it this and only this or is there more:

  rherrera72 said   The main problem is that terminal in linux, like putty, screen, miniterm.py, etc... are not capable for pushing Fn keys, because the graphical interface normaly interrupt those keys, and for a laptop computer is not so useful without graphics interface.

That is why I have to carry monitor and keyboard ... and laptop computer all the time.

That causes other problems, to update software or simply make a backup, because I only have monitor and keyboard and not a computer on the other side of the cable I must use SD card for commute the code between devices.


In other words are you wanting to carry around just the laptop?

And is it that you can't do that because of ... well, what is the full list of things you need the monitor+keyboard for that the laptop can't do?

Are you wishing to avoid using the SD card?

(I'm trying to get a full specification.)

John
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 01:51am 08 Nov 2014
Copy link to clipboard 
Print this post

Hello Johns, well yes, the lesser the better, only laptop to carry around, and the capability to upload/download with the the cable would be nice. The main problem is that I am not allow to save thru the terminal program in Linux, because the Fn keys, by the way I did not tried in other OS.

Best regardsEdited by rherrera72 2014-11-09
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 11:30am 08 Nov 2014
Copy link to clipboard 
Print this post

There are alternative keys that can be used instead of the function keys:

  Quote  
You can also use control keys instead of the functions keys listed above. These control keystrokes are:
LEFT Ctrl-S
RIGHT Ctrl-D
UP Ctrl-E
DOWN Ctrl-X
HOME Ctrl-U
END Ctrl-K
PageUp Ctrl-P
PageDn Ctrl-L
DEL Ctrl-]
INSERT Ctrl-N
F1 Ctrl-Q
F2 Ctrl-W
F3 Ctrl-R
ShiftF3 Ctrl-G
F4 Ctrl-T
F5 Ctrl-Y


Jim
VK7JH
MMedit   MMBasic Help
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 08:03pm 08 Nov 2014
Copy link to clipboard 
Print this post

  TassyJim said   There are alternative keys that can be used instead of the function keys:

  Quote  
You can also use control keys instead of the functions keys listed above. These control keystrokes are:
LEFT Ctrl-S
RIGHT Ctrl-D
UP Ctrl-E
DOWN Ctrl-X
HOME Ctrl-U
END Ctrl-K
PageUp Ctrl-P
PageDn Ctrl-L
DEL Ctrl-]
INSERT Ctrl-N
F1 Ctrl-Q
F2 Ctrl-W
F3 Ctrl-R
ShiftF3 Ctrl-G
F4 Ctrl-T
F5 Ctrl-Y


Jim


Thank you for the response, those are in the manual, but they do not work, well only CTRL-E, Please remember I do not use any privative OS. best regards.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 11:36pm 10 Nov 2014
Copy link to clipboard 
Print this post

Do you use a desktop (GUI) suach as KDE? Which one?

I can explain the path of keystrokes all the way to the far end (the 'mite). That then reveals what you can do.

JohnEdited by JohnS 2014-11-12
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 07:00pm 17 Nov 2014
Copy link to clipboard 
Print this post

it does not matter, gnome, KDE, CFKD, LXDE, all the same, even plain old terminal, it seems that screen, miniterm.py or putty do not capture any Fn or Ctrl-X commands.

Best Regards
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 11:28pm 19 Nov 2014
Copy link to clipboard 
Print this post

It does matter what and how you do it.

A keystroke travels through lots of places and can be used up by any of them. If you want certain ones to get through to a 'mite then you need to prevent any other part of the system from grabbing the keystroke.

There's roughly:
key -> driver -> kernel (such as SysRq key) -> X -> GUI -> window -> app -> ... -> 'mite

At each step the key may be used up or converted or translated or as with most just left alone. Used up is what you don't want so you must set it not to happen (such as by stty command and/or carefully chosen app).

The "app" may be such as putty, minicom, screen, gtkterm, picocom and you may be able to configure it to tell the kernel you want more keystrokes than it would by default pass along.

In the case of a desktop/laptop PC by "key" I suppose I mean scancode, and both down and up scancodes are available if you wish (generally it's easier to let driver etc sort that level out).

Clearly if you use no X, no GUI (aka desktop manager) and no window you immediately avoid 3 places that can intercept keys. Did you try? (E.g. boot with just single user prompt, i.e. run level 1 rather than 5, 6 or 3.)

Equally, did you try stty?

Did you try careful configuration (maybe just command line options) of things like screen & putty?

Another choice is to remap keystrokes. Did you try that?

The source codes of most or all of those apps (terminal emulators) are available so you could customise one. Did you try that?

When you run the app (screen or putty etc) it is given an environment (see it via the set command) and you may want to change things in there like the TERM value.

Overall you can do it, but it may take a little effort.

By way of example, F5 is refresh by default in a browser, Alt+F4 closes a window and so on but such things can all be changed. Find which ones you want to get through to the 'mite and if intercepted then find where and stop it.

One thing you may like to do is to write a tiny Basic program that inputs a single key without waiting for Enter then prints the decimal value it got so you can see which keys produce which values (I'd use a loop). Obviously A should be 65, 1 should be 49 and so on. The keys that are not what you want will either not get through at all or be the wrong values. Then you know what you're trying to fix. Be thorough and make exact notes or you'll struggle!

JohnEdited by JohnS 2014-11-21
 
rherrera72

Newbie

Joined: 08/11/2014
Location: Guatemela
Posts: 12
Posted: 08:18am 26 Nov 2014
Copy link to clipboard 
Print this post

  JohnS said   It does matter what and how you do it.

A keystroke travels through lots of places and can be used up by any of them. If you want certain ones to get through to a 'mite then you need to prevent any other part of the system from grabbing the keystroke.

There's roughly:
key -> driver -> kernel (such as SysRq key) -> X -> GUI -> window -> app -> ... -> 'mite

At each step the key may be used up or converted or translated or as with most just left alone. Used up is what you don't want so you must set it not to happen (such as by stty command and/or carefully chosen app).

The "app" may be such as putty, minicom, screen, gtkterm, picocom and you may be able to configure it to tell the kernel you want more keystrokes than it would by default pass along.

In the case of a desktop/laptop PC by "key" I suppose I mean scancode, and both down and up scancodes are available if you wish (generally it's easier to let driver etc sort that level out).

Clearly if you use no X, no GUI (aka desktop manager) and no window you immediately avoid 3 places that can intercept keys. Did you try? (E.g. boot with just single user prompt, i.e. run level 1 rather than 5, 6 or 3.)

Equally, did you try stty?

Did you try careful configuration (maybe just command line options) of things like screen & putty?

Another choice is to remap keystrokes. Did you try that?

The source codes of most or all of those apps (terminal emulators) are available so you could customise one. Did you try that?

When you run the app (screen or putty etc) it is given an environment (see it via the set command) and you may want to change things in there like the TERM value.

Overall you can do it, but it may take a little effort.

By way of example, F5 is refresh by default in a browser, Alt+F4 closes a window and so on but such things can all be changed. Find which ones you want to get through to the 'mite and if intercepted then find where and stop it.

One thing you may like to do is to write a tiny Basic program that inputs a single key without waiting for Enter then prints the decimal value it got so you can see which keys produce which values (I'd use a loop). Obviously A should be 65, 1 should be 49 and so on. The keys that are not what you want will either not get through at all or be the wrong values. Then you know what you're trying to fix. Be thorough and make exact notes or you'll struggle!

John


Thanks for your response, well, there are many issues here but all points to one thing, and is the one that i do not want to do, and is to write a driver, i could remap each app to match the code that mite wants, but that is exactly the opposite way i want to go, since the mite environment is basically a serial terminal, and all serial terminal works without changing much the client (at least in my experience) could be possible only to change an easily recalled command and thats it.

The whole purpose is to make the mite portable, that means zero conf, no monitor, no keyboard, no laptop to carry, one borrowed old computer does the job, some KISS principle philosophy never hurts.

I will remap for screen and post the result here when its done. thanks a lot, bless youEdited by rherrera72 2014-11-27
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 08:45am 26 Nov 2014
Copy link to clipboard 
Print this post

  rherrera72 said  
  JohnS said   It does matter what and how you do it.

A keystroke travels through lots of places and can be used up by any of them. If you want certain ones to get through to a 'mite then you need to prevent any other part of the system from grabbing the keystroke.

There's roughly:
key -> driver -> kernel (such as SysRq key) -> X -> GUI -> window -> app -> ... -> 'mite

At each step the key may be used up or converted or translated or as with most just left alone. Used up is what you don't want so you must set it not to happen (such as by stty command and/or carefully chosen app).

The "app" may be such as putty, minicom, screen, gtkterm, picocom and you may be able to configure it to tell the kernel you want more keystrokes than it would by default pass along.

In the case of a desktop/laptop PC by "key" I suppose I mean scancode, and both down and up scancodes are available if you wish (generally it's easier to let driver etc sort that level out).

Clearly if you use no X, no GUI (aka desktop manager) and no window you immediately avoid 3 places that can intercept keys. Did you try? (E.g. boot with just single user prompt, i.e. run level 1 rather than 5, 6 or 3.)

Equally, did you try stty?

Did you try careful configuration (maybe just command line options) of things like screen & putty?

Another choice is to remap keystrokes. Did you try that?

The source codes of most or all of those apps (terminal emulators) are available so you could customise one. Did you try that?

When you run the app (screen or putty etc) it is given an environment (see it via the set command) and you may want to change things in there like the TERM value.

Overall you can do it, but it may take a little effort.

By way of example, F5 is refresh by default in a browser, Alt+F4 closes a window and so on but such things can all be changed. Find which ones you want to get through to the 'mite and if intercepted then find where and stop it.

One thing you may like to do is to write a tiny Basic program that inputs a single key without waiting for Enter then prints the decimal value it got so you can see which keys produce which values (I'd use a loop). Obviously A should be 65, 1 should be 49 and so on. The keys that are not what you want will either not get through at all or be the wrong values. Then you know what you're trying to fix. Be thorough and make exact notes or you'll struggle!

John


Thanks for your response, well, there are many issues here but all points to one thing, and is the one that i do not want to do, and is to write a driver, i could remap each app to match the code that mite wants, but that is exactly the opposite way i want to go, since the mite environment is basically a serial terminal, and all serial terminal works without changing much the client (at least in my experience) could be possible only to change an easily recalled command and thats it.

The whole purpose is to make the mite portable, that means zero conf, no monitor, no keyboard, no laptop to carry, one borrowed old computer does the job, some KISS principle philosophy never hurts.

I will remap for screen and post the result here when its done. thanks a lot, bless you


There is NOTHING in what I wrote or the way Linux works that suggests you should write a driver.

That is definitely NOT the way to go. Nothing I put is meant to even suggest that.

Please re-read and understand how Linux works then use it as it is intended.

John
 
     Page 1 of 2    
Print this page
© JAQ Software 2024