Recent Posts

Pages: [1] 2 3 ... 10
1
mc-Module / Re: mcModule as doorbell
« Last post by michaelblight on September 01, 2018, 08:07:38 am »
Thanks! Can't wait to try it out. Much better than those suckers with their voltage hungry Arduinos
2
mc-Module / Re: mcModule as doorbell
« Last post by mc-T2 on August 27, 2018, 09:51:05 am »
@michaelblight - you are correct, i think i put in the wrong code for you. There is a button on the mcMod's that you can use - it is predefined within the langage script (as button) and can be used. However, this button will be quite touch for someone to press as a doorbell. Here is code that is better suited to what you want to do (With a button soldered to pin0 and GND):

Code: [Select]
Define PinMode Pin0 As DigitalInputPullupWeak
Class mcSwitch
   
   
   
    //The following will send an IFTTT message when the button is pressed & will light the LED when pressed
    Shared Event Pin0FallingEdge()     
        Thread.Sleep(50000)
        'This timing may need To be modified but essentially this Is a debounce.After the device detects a change it waits 50 ms To check again To confirm that the button was actually pushed * *
        Thread.ClearHardwareEvent()
        If Pin0 = False Then
            Lplan.IFTTT("YOURIFTTTKEYHERE", "BUTTON")
            LedGreen = True // turn off LED
            Thread.Sleep(100000)
            LedGreen = False
            Thread.Sleep(30000000)
            'This can also be modified.After the above program runs, the module will Not be able To run it again For 120 Seconds / 2 Minutes (the timing Is In microSeconds).If you want, you can change this To 6000000 which will give you 60 Seconds before the button can be pressed again.
        End If
    End Event
End Class
   
End Class

Hope that helps
3
mc-Module / Re: mcModule as doorbell
« Last post by michaelblight on August 26, 2018, 02:57:39 am »
Thanks @mc-T2 for the update - I will try it soon. I'm a bit confused though. You said you soldered a push button between Pin 0 and GND, but the code is responding to the ButtonPressed event. Or am I reading it wrong - have you soldered the button in parallel with the existing button on the mcModule? Is there an event that will fire on a change to Pin 0? I have soldered breadboard cables to these pins in anticipation, which was challenging with old eyes. I don't like my chances of soldering to the button on the PCB!
4
mc-Dev Board / Re: [SOLVED] UART console example not working on mcMod120
« Last post by PeggyLeon on August 20, 2018, 01:13:55 pm »
Hi...i am a new user here. I think you shoudn't face this problem. The mcSense420 combines multiple onboard sensors and the long-range mcAir low-power LAN protocol into an affordable, long-lasting, and compact IoT remote sensing device.
5
mc-Things General Discussion / Re: Question about Kickstarter versions
« Last post by mc-T2 on August 14, 2018, 11:09:46 am »
Hey michaelblight,

sorry for the delay and good job on answering your own questions  :) just to expand on your answers:

is a mc-router and a mc-gateway the same thing - YES - correct. It was originally called an mc-Router but has now changed to mcGateway to better reflect what the hardware does. We are close to releasing mcCloud to the public (within the next month or 2) and at that time, anyone wishing to use the new system will need to upgrade to new hardware as the older hardware does not have the capabilities to work on the new version. More info on mcCloud here: https://www.mcthings.com/getting-started-mccloud/

does the current IDE still work with those version - YES - Yes, for the legacy version of devices. We will continue to provide the firmware and software (mcStudio) for the older version on our website for some time but we will not be supporting this in the future as we are focusing on the new version of mcThings which includes the new mcCloud

can the firmware be updated on them - YES - Yes, with the legacy version of the firmware (mcOS). Again, we will not be supporting any fixes or updates on the legacy version of the system.

were there battery issues with the 1st gen - I haven't found any problems yet. They started out at 2.9 volts about 7 weeks ago, and they're now are 2.8 volts. I'm sending temperature, battery and status readings every 30 minutes. - correct, there were some battery issues but those were fixed, mostly in mcOS. You should be getting some serious life out of your batteries from the devices

is the Kickstarter mc-module the same as the 100 - YES - Correct. It was actually called the mcMod110 which has subsequently been replaced with the new mcMod120 which will be required for using the new system with mcCloud. NOTE - a new mcGateway120 will also be required to use the new system.

am I wasting my time - probably, but why would I make a value judgement - We, of course, dont think it is a waste of time!  :)

However, the mcModule110s are no longer available and the newer mcModule120s are not compatible with the old gateway. So if I want more I basically have to start from scratch. Bummer. - This is correct and for good reason. The new system makes it much easier to work with multiple devices (you can manage all your devices from the cloud!) and ensures that there is high-security for solutions being created. We have already deployed new mcCloud devices into multiple projects for some very large clients and now we are vamping up the system for public use as soon as we can.

Hope that helps.
Take care

6
mc-Module / Re: mcModule as doorbell
« Last post by mc-T2 on August 14, 2018, 10:43:08 am »
Hey michaelblight,

yes, I havent seen anyone post this project yet, however, we have done this ourselves and i know of some users who have done a button onto a mcModule. The mcModule includes a small button/switch already but if you wished, you could connect a push button and use it for a doorbell (or other purposes).

Since you are working on the older version (legacy) of the mcThings platform, you will need to work with some older code. NOTE - We are moving towards the public release of mcCloud in the next month or two so keep an eye out as the new version of mcCloud is very versatile and makes it much easier to work with multiple devices! Older equipment will not work on the new system but we are going to be offering our users discounted hardware for those who want to move to the new system. It should also be noted that we are no longer supporting the legacy system (no new firmware, big fixes, etc) as we are focusing on the new version.

Button code: The below is a code we used to send information to the IFTTT service but you can modify it to send the info to elsewhere if you wish. A standard pushbutton was soldered to PIN 0 and GRD from the button and then the device was loaded with the below code:


Code: [Select]
Class ButtonExample
   
    //The following will send an IFTTT message when the button is pressed & will light the LED when pressed
    Shared Event ButtonPressed()
        Thread.Sleep(50000)
        Thread.ClearHardwareEvent()
        'If Pin0 = False Then
        If Button0 = False Then
            Lplan.IFTTT("YOURIFTTTWEBHOOKKEYHERE", "BUTTON", "pressed")
            LedGreen = True // turn off LED
            Thread.Sleep(100000)
            LedGreen = False
            Thread.Sleep(120000000)
        End If       
    End Event   
End Class

From there, we setup an IFTTT applet which would send a notification/email/text when the button is pressed. Note, there can sometimes be some lag as you are working with a third-party service.. sometimes it is lightening fast and other times it can take up to a minute. You will also need to test and ensure that your mcGateway is in range of the device.
Hope that helps, good luck and when the new version of mcCloud is out, we will be pushing out the same above example for a button so you can do this on the new system.
Thanks
7
mc-Things General Discussion / Re: Question about Kickstarter versions
« Last post by michaelblight on August 03, 2018, 02:19:31 am »
For anybody else in a similar situation, let me answer my own questions.
  • is a mc-router and a mc-gateway the same thing - YES
  • does the current IDE still work with those version - YES
  • can the firmware be updated on them - YES
  • were there battery issues with the 1st gen - I haven't found any problems yet. They started out at 2.9 volts about 7 weeks ago, and they're now are 2.8 volts. I'm sending temperature, battery and status readings every 30 minutes.
  • is the Kickstarter mc-module the same as the 100 - YES
  • am I wasting my time - probably, but why would I make a value judgement
However, the mcModule110s are no longer available and the newer mcModule120s are not compatible with the old gateway. So if I want more I basically have to start from scratch. Bummer.
8
mc-Module / mcModule as doorbell
« Last post by michaelblight on August 03, 2018, 02:08:31 am »
I'm looking to hook up a mcModule as a doorbell sending MQTT messages. I haven't been able to find any existing examples, and I'm no electrical engineer! Is it enough to connect pin 7 and GND to a push-button and define it as AnalogInputPullDown? I'm guessing not. Or do I need to connect VDD to push-button to pull-down resistor to GND and then connect pin 7 between switch and resistor?

And then is there an event to hook into that will fire when the push-button is pressed? Or do I have to poll pin 7 (which would drain the battery too fast)?

Any help would be appreciated.
9
mc-Innovations / Translate acceleration in G's to textual states.
« Last post by Junkboy on July 09, 2018, 03:10:42 pm »
Hello community of McThings, I am developing a project, in which I am using a module Mc120, which currently transmits via MQTT the angles of inclination and the acceleration of all its axes, all this information is sent every 3 seconds, since it is Very fast, a battery that in "theory" should last up to 5 years lasts no more than 2 weeks.

What is currently done is to receive the acceleration and tilt of the device in an MQTT server, the information is analyzed to translate the states to a person for example "Walking" or "Running" etc.

What I want to do to save battery is the following:

I think to use the function:
accel.ConfigureMotionInterrupt (1.15, 20.0)

This would cause an interruption when there is an acceleration equal to or greater than 1.15G for more than 2 ms, this is just an example in practice those parameters would change.

The idea would be to set the parameters so that when there is some acceleration the device wakes up and knows that there is movement, then it would have to verify in which case it is.

In my personal experience I know a lot more about the C ++ language so I can imagine it in this way in C ++:

if (accel> = 1.15)
{
 state = ON;
}

if (accel> = 1.15 && accel <= 1.8)
{
 printf ("Walking"),
}
if (accel> = 1.81 && accel <= 2.2)
{
 printf ("Runing"),
}
if (accel <= 1.15)
{
 printf ("Stopped"),
}

With these conditions I seek to make instead of every 3 seconds send me the acceleration etc, better the device stays off until there is some acceleration and send me the message that is what you are doing, in the case of "Stopped" is only to put it because in reality if there is no acceleration greater than 1.15 will not turn on, that's the idea and in fact I also have to do some condition or something so that as long as it is lower than 1.15 send the message "Stopped" but. I do not want them to repeat either, that is if the current state is "Stopped" that sends it only once, if it starts to walk then it sends "Walking" but if it kept walking 15 minutes, do not send me that message again until it change of state

I hope to be explaining, the truth is a bit complicated programming in McStudio for me, but I would like to know if someone can help me to translate this to the language used in McStudio because for example I do not know how to put a conditional with intervals, in the case of "if (accel > = 1.15 && accel <= 1.8)" I do not know how to do it in McStudio, nor am I sure how to make the data not repeat.

I would really appreciate very much if someone could support me a little with this.

Beforehand thank you very much.
10
mc-Things General Discussion / Re: Help with the accelerometer (mcMod120)
« Last post by Junkboy on July 05, 2018, 04:38:06 pm »
Thank you Nick_W, that help me a lot, I will send you a message, check it out please :D!
Pages: [1] 2 3 ... 10