Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:02 29 Nov 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 : Micromite beta 7

     Page 1 of 7    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 07:04pm 19 Feb 2014
Copy link to clipboard 
Print this post

A note to anyone playing with the Micromite to check their inbox for the latest Micromite beta.

In this version I have fixed the two bugs reported in beta 6 and added:
- The IR SEND command for transmitting a Sony IR remote code.
- Five PWM or SERVO outputs
- The DISTANCE command which uses the HC-SR04 ultrasonic sensor to measure distance to a target.

I know that I am going to regret asking this but is there any other device that would benefit from having support built into MMBasic?

Whatever it is it would have to be readily available, reasonable cost, of interest to a lot of people, technically feasible and not easily doable in BASIC. I cannot guarantee to implement anything as the Micromite is running out of flash again and I still want to implement RF communications (the debate that is raging in the beta 6 thread). But, there might be something that is easy to do that I have missed.

Geoff

EDIT: The zip file contains both the 28 pin and 44 pin versions. The title of the zip file is confusing.Edited by Geoffg 2014-02-21
Geoff Graham - http://geoffg.net
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 07:15pm 19 Feb 2014
Copy link to clipboard 
Print this post

Awesome Geoff..!!

All nice additions. Is the IR transmit as simple as adding 1 or 2 IR LED's to the port line, or should we be using a 5v based driver circuit for better range..? Maybe other fine folks here can chime in of this one. This means we can construct a simple remote with keypad, display, IR or RF transceivers...!! (sweet)

Thanks again Geoff for all your fine work on this project..

 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 07:24pm 19 Feb 2014
Copy link to clipboard 
Print this post

Received.

Now, where the hell did I put my PICKIT3.......
Smoke makes things work. When the smoke gets out, it stops!
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:22pm 19 Feb 2014
Copy link to clipboard 
Print this post

Thanks Geoff

Your new version solves the problem of having to set the number of
lines in TeraTerm perfectly

And we got new features


Regards
Jman
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 08:26pm 19 Feb 2014
Copy link to clipboard 
Print this post

@ jman - your PICKIT3 arrived at last then?
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 08:33pm 19 Feb 2014
Copy link to clipboard 
Print this post

  Zonker said  Is the IR transmit as simple as adding 1 or 2 IR LED's to the port line, or should we be using a 5v based driver circuit for better range..?

You can drive an IR led directly but you must limit the current to about 10mA which will restrict the range. Page 16 of the manual shows a simple driver and using that you can get a far better range.

Geoff
Geoff Graham - http://geoffg.net
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:42pm 19 Feb 2014
Copy link to clipboard 
Print this post

  Grogster said   @ jman - your PICKIT3 arrived at last then?


It did :)
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 09:01pm 19 Feb 2014
Copy link to clipboard 
Print this post

Thanks for new update Geoff.

I use Humidity sensor DHT22 a far bit.

Couple of very popular low cost units on ebay are DHT11 low resolution/accuracy and DHT22 higher res, by the way they are combined humidity and temperature sensors. They use proprietary 1-wire protocol, MMBasic is too slow to provide timing.

http://www.ebay.com.au/sch/i.html?_odkw=dht+22humidity+senso r+arduino&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR 0.TRC0.H0.Xdht+22+humidity+sensor+arduino&_nkw=dht+22+humidi ty+sensor+arduino&_sacat=0

Would be good if MMBasic could support humidity measurement in firmware, it would compliment temperature measurement for environmental control type applications.

I will dig up data sheet and post later.

http://www.adafruit.com/datasheets/Digital%20humidity%20and% 20temperature%20sensor%20AM2302.pdf

http://learn.adafruit.com/dht/downloads


Please consider.

Regards
JohnLEdited by JohnL 2014-02-21
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 09:13pm 19 Feb 2014
Copy link to clipboard 
Print this post

  jman said  It did :)


That's GREAT!

Now, if I could just find MINE!
It's red, for God's sake, you would think it would stand out!
Where the hell is it?!(rhetorical)

...rummage, rummage...
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6102
Posted: 09:46pm 19 Feb 2014
Copy link to clipboard 
Print this post

  JohnL said   Thanks for new update Geoff.

I use Humidity sensor DHT22 a far bit.

Please consider.

Regards
JohnL

I have a couple of DHT22/AM2302 sensors to play with but haven't got around to it yet.
I agree that they will be a challenge to do in MMbasic so I would add a vote for them to be included.

My ultrasonic range module is a 3 wire unit. Everything is the same as the 4 wire one included but the start and return terminals are common.

This is not a problem as MMbasic is quite capable of measuring the pulses.
I had that one working 12 months ago.

Jim

VK7JH
MMedit   MMBasic Help
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 10:01pm 19 Feb 2014
Copy link to clipboard 
Print this post

I'll put in a vote for the humidity sensor. I've been using HH10D but the DHT22 with Temp as well would be a better choice.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 10:42pm 19 Feb 2014
Copy link to clipboard 
Print this post

Stepper motors with end stops monitoring.
It would require 3 pins per motor.
Direction, step and an input to monitor the end stop.
In basic it gets large very quickly and timings of the signals is difficult.
If there is enough code room there could be optional added functionality for acceleration and deceleration.
Commands to move it to an absolute or relative location would allo BASIC to control the overall movements but it is freed from the nitty-gritty part also saving on MMBasic memory requirements.


Microblocks. Build with logic.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 10:49pm 19 Feb 2014
Copy link to clipboard 
Print this post

Yet again you have exceeded expectations - another brilliant piece of work Geoff

Regarding anything else to include, Humidity sensor would be great and hopefully take up very little space to include (my money is on you having done this already!! ).

Another device that would open up the MicroMite to creative builders out there would be RFID support. Before anyone says this is way too complex a topic let me suggest the following simple RFID module.

This is a low cost reader designed to read a 13.56MHz tag at short range. There are alternatives but anything from Sparkfun is generally available around the world.
Liken this module to a proximity card reader at a secured door.

MMBasic could include a command such as 'Reader(pin,interrupt)' which simply jumps to the interrupt routine when a tag is detected outputting the TagID as a string and/or byte array (typically 8 bytes).

Even though this could be coded in Basic, it would make it user friendly just like all the things you have already included (IR, Keypad, LCD, servo etc).

So hopefully little code space required but opens up the world of reading single tags to make some interesting projects.


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 11:23pm 19 Feb 2014
Copy link to clipboard 
Print this post

Hi,

The problem with the Ultrasonic Modules and Basic is to read the output length from.
so ill guess a "simple" command to get this from a user specified port is enough , so the rest can calculate
in basic . Maybe this way is usefull for other Hardware and costs less Flash Memory .
Get Pulselenght Port(x) or something .
I think this Command ( for Ultrasonic ) and other easy in Basic to implement Command (Gps .. ) is
verry usefull for FPV Freaks and Car/ Robot Builder.


If peek/poke really not usefull for micromite so kill it to get some flash but ill guess this give only a Small Part of Bytes .


Thx for your Hard Works Geoff .
gtx
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 11:46pm 19 Feb 2014
Copy link to clipboard 
Print this post

A keypad that is connected uses a lot of pins, maybe a different wiring of the same keypad with some resistors to get a analog keypad that uses only one pin. This has been discussed in other topics before. It will make the 28pin version more capable.
Especially in combination with an LCD (Which also uses an amount of pins) this would work great.

[code]
KEYPAD var, int, r1, r2, r3, r4, c1, c2, c3, c4
and analog version
KEYPAD var, int, AnalogPin
[/code]

If keypad presses can be routed so that the uMite thinks it comes from the console would make writing programs that use keypad input a lot easier.

An OPTION command could then be used to setup the routing.

Another way would be to have a command that can push a keycode into the keyboard buffer.
The keypad would then work normally through an interrupt and in the interrupt routine you would then determine which ascii value it would represent and then push it. This gives the programmer to dynamically attach ascii codes to keypad buttons.

A program expecting input would then work like it is getting keyboard data from the console and would not know any different.

Maybe still support a PS/2 keyboard, but only if memory allows it.



Edited by TZAdvantage 2014-02-21
Microblocks. Build with logic.
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 11:54pm 19 Feb 2014
Copy link to clipboard 
Print this post

hmm forget my suggestions , i write this before i opening the beta
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 11:59pm 19 Feb 2014
Copy link to clipboard 
Print this post

Geoff,

Slightly off topic - but TZAdvantage's last post prompted this:
Could the MaxiMite be modified easily to support USB keyboards instead of PS2? Or would this take way too much space?

Note I am NOT asking this for the uMite as simply not required . . .
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 12:03am 20 Feb 2014
Copy link to clipboard 
Print this post

USB host code is pretty complicated and the libraries that are available are big.
I think it will be impossible.

A USB Keyboard to serial adapter would be nice to have. It probably can be made with a small pic. (Another project on my todo list :) )



Microblocks. Build with logic.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 12:38am 20 Feb 2014
Copy link to clipboard 
Print this post

Yes, doing USB host is rather complicated and anyway the Maximite (both colour and monochrome) do not have the correct connector. The other issue is that you would then loose the USB device function.

It seems much easier to buy a PS2 keyboard.

Geoff
Geoff Graham - http://geoffg.net
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 831
Posted: 01:16am 20 Feb 2014
Copy link to clipboard 
Print this post

Hi Geoff,

five firmware independant PWM outputs! AMAZING! That's what I am waiting for!!!
Thank you very much! It works perfectly!
I've ordered a HC-SR04 for testing your new command!

Thanks a lot for your hard work!!!

Frank
 
     Page 1 of 7    
Print this page
© JAQ Software 2024